自定义函数(def):创建和调用

1.函数的创建和调用

>>> def MyFirstFunction():
	print('hello')

	
>>> MyFirstFunction()
hello
>>> 
>>> def test(name):
	print(name)

	
>>> test('itxds')
itxds
>>> def add(num1,num2,num3):
	return num1+num2+num3

>>> add(1,2,3)
6
>>> 
原文地址:https://www.cnblogs.com/xiangdongsheng/p/13416717.html