def函数
def function():
print('This is a function.')
a=1+2
print(a)
function()
添加参数
def fun(a,b)
c=a*b
print('the c is ',c)
默认函数、参数
def sale_car(price,colour,brand,second_hand,length=5,hight=6):
print('price:',price,
'colour:',colour,
'brand:',brand,
'second_hand:',second_hand,
'length:',length,
'hight:',hight)
sale_car(1000,'red','carmy',True)