Python def函数及参数
自定义函数
例一:
def hello():
print("K")
print("J")
print("I")
print('\n')
hello()
hello()
hello()
例二:
def hello(name):
print('hello '+name)
hello("Alice")
例三:
def io(i):
if i <10:
print("小于")
elif i == 10:
print('等于')
else:
print('大于')
io(10)
版权属于:Eric Qiu*
本文链接:https://eblog.ink/archives/192/
转载时须注明出处及本声明
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。