#列表 字典 集合 类 ----局部变量可以改全局变量,除了整数和字符串 names=["alex","jack","luck"] def func(names): names[0]='金角大王' print("inside name:" ,names) func(names) print (names) #字符串 name='jack' name1=name name='jack_chen' print(name,name1)#name的值为jack_chen ,name1的值为jack
#列表 字典 集合 类 ----局部变量可以改全局变量,除了整数和字符串 names=["alex","jack","luck"] def func(names): names[0]='金角大王' print("inside name:" ,names) func(names) print (names) #字符串 name='jack' name1=name name='jack_chen' print(name,name1)#name的值为jack_chen ,name1的值为jack