原列表:username=['Larry','Marry','Smith']
新列表:new_names=['the Great Smith','the Great Marry','the Great Larry']
def make_great(names):
while names:
current_name='the Great '+names.pop()
new_names.append(current_name)
return new_names
def show_magicians(names):
for name in names:
print(name)
new_names=[]
username=['Larry','Marry','Smith']
new_names=make_great(username)
show_magicians(new_names)