首页
Java
登录
6mi
u
盘
搜
搜 索
Java
Python学习记录W3-13:函数的形参实参,关键参数,位置参数
Python学习记录W3-13:函数的形参实参,关键参数,位置参数
xiaoxiao
2021-02-28
27
# Author: Allenlee
def
test
(x
,
y):
print
(x)
print
(y)
#test(y=2,x=1) #与形参顺序无关
#test(1,2) #与形参一一对应
test(
x
=
2
,
3
)
#关键参数不能写在位置参数前面
#test(3,y=2)
转载请注明原文地址: https://www.6miu.com/read-2619284.html
技术
最新回复
(
0
)