摘要:
```python 这个地方理解即可,只是面试的时候会被问到,单独做了一下知识点的整理,不推荐使用。 def self_max(a,b,c,d,e,f,g,h,k,x=1,y=3,z=4): #默认参数 print(a,b,c,d,e,f,g,h,k,x,y,z) args=[1,2,3,4,5,6,7,8,9,20,30,56] 把这个列表内的元素一个一个的... 阅读全文
posted @ 2019-09-14 16:27
大海一个人听
阅读(180)
评论(0)
推荐(0)
摘要:
```python def self_max(*args,**kwargs): print(args) print(kwargs) self_max(1,2,3,4,5,6,7,x=6,y=8,z=80,e=50) 输出结果是:
(1, 2, 3, 4, 5, 6, 7)
{'x': 6, 'y': 8, 'z': 80, 'e': 50} *args:接受了所有... 阅读全文
posted @ 2019-09-14 16:10
大海一个人听
阅读(277)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2019-09-14 16:02
大海一个人听
阅读(161)
评论(0)
推荐(0)
摘要:
```python import time # 闭包函数 def outer(): x = 100 def inner(): print(x) return inner fun = outer() print(fun) #函数不加括号,调用的是函数本身【function】 # .inner at 0x0000000001F151E0> ti... 阅读全文
posted @ 2019-09-14 11:35
大海一个人听
阅读(494)
评论(0)
推荐(0)

浙公网安备 33010602011771号