# -*- coding: utf-8 -*-
def test1(x,y):#x,y为形参
print(x)
print(y)
test1(1,2) #1,2为实参
def test2(x=1,y=2):#默认参数
pass
def test3(*args):#参数组
print(args)
test3(1,2,3,4,5,6,7)#不固定参数个数时用参数组,元组形式
test3(*[1,2,3,4,5,6,7])#args=tuple([1,2,3,4,5,6,7])元组形式
def test4(x,*args):#形参+参数组
print(x)
print(args)
test4(1,2,3,4,5,6,7)
def test5(**kwargs):#把N个关键字参数转换成字典
print(kwargs)
print(kwargs["name"])
print(kwargs["age"])
test5(name="hekaiqiao",age=5)