magician_names = ['mike', 'tom', 'julia']
def make_great(names):
i = 0
while i < len(names):
names[i] = "the Great " + names[i]
i += 1
def show_magicians(names):
print("The names of the magicians are as follows:")
for name in names:
print (name)
print ("before change:")
show_magicians(magician_names)
print ("after change:")
make_great(magician_names)
show_magicians(magician_names)
在函数中修改列表