ls = ["car","truck"]
def funC(a):
ls.append(a) return
funC("bus")
print(ls)
全局变量定义在函数外面,局部变量定义在里面。可选参数要设置默认值比如def funC(a="bus"): 否则就是非可选参数