I study Python one week and get one problem. One list was edited in function. I got correct list when print the parameter, but original list is null.
name_list=['Jack','Lucky','Jimi','Andy']
def show_magicians(list):
for name in list:
print('Magician name is ' + name + '!')
def make_great(list):
new_name_list=[]
while list:
temp_name = list.pop()
new_name_list.append('the Great ' + temp_name)
list = new_name_list[:]
print(list) # I get correct list.
print(name_list) # the list is null ???
make_great(name_list)
show_magicians(name_list)