1. 程式人生 > >Python3函式介紹(一)——函式引數

Python3函式介紹(一)——函式引數

1.引數型別
①位置引數
def hello_1(greeting,name):
print(’%s,%s’%(greeting,name))

hello_1(‘Hi’,‘John’)
Hi,John
②關鍵字引數

③預設引數

④可變引數(收集引數)

⑤引數解包

2.初始化資料結構

未完待續……