O'Reilly logo
  • Longxiang Lyu thinks this is interesting:

8-10. Great Magicians:

From

Cover of Python Crash Course

Note

magicians = ['bob dylan', 'zemin jiang', 'british queen']

def show_magicians(names): """print magician names""" print("\nthe magicians are:") for name in names: print name.title()

show_magicians(magicians)

def make_great(names): for i, name in enumerate(names): names[i] = 'The Great ' + name

make_great(magicians) show_magicians(magicians)