Python编程从入门到实践
8-10 了不起的魔术师
答案
#8-11 qs 2020_08_06
def show_magicians(s_names):
for name in s_names:
print(name)
def make_great(m_names):
temp_names = []
while m_names:
name = m_names.pop()
name = 'the Great ' + ' ' + name
temp_names.append(name)
while temp_names:
name = temp_names.pop()
m_names.append(name)
names = ['a','b','c','d','e','f','g']
print('make_great()函数处理前:')
show_magicians(names)
make_great(names)
print('make_great()函数处理后:')
show_magicians(names)