# -*- coding: utf-8 -*-标签:10,name,python,菜鸟,参数,print,def,函数 From: https://www.cnblogs.com/liyuzhoupan/p/16601827.html
# 回参函数
def test01():
return 0
# 以元组返回参数
def test02():
return 1, [1, 2, 3, 4, 5], {"name": "liyuzhoupan"}
# 有参函数
def test03(x, y):
print(x)
print(y)
# 默认参数函数
def test03(x, y=2):
print(x)
print(y)
# 参数组: 接收位置参数(1,2,3,4,5,6,)
def test04(*args):
print(args)
# 字典参数:接收关键字参数x="name"
def test5(x, **kwargs):
print(x)
print(kwargs.keys())
test5(x=1, name="liyuzhoupan", age="26", level="1")