函数参数
函数参数详细操作教程
以下实例为学习函数参数,具体代码如下:
# Filename : example.py
# Author by : www.lidihuo.com
def my_function(fname):
print(fname + " Gates")
my_function("Rory John")
my_function("Jennifer Katharine")
my_function("Phoebe Adele")
执行以上代码输出结果为:
# Filename : example.py
# Author by : www.lidihuo.com
Rory John Gates
Jennifer Katharine Gates
Phoebe Adele Gates