我有以下代码
magicians=['andrew','mike','bella']
def change(names):
for name in names:
name='the great '+name
change(magicians)
print(magicians)
预期输出:
['the great andrew', 'the great mike', 'the great bella']
实际输出:
['andrew', 'mike', 'bella']
传递的变量似乎没有变化