Last active
June 25, 2016 05:16
-
-
Save ItsBerry/ea24b64971ebc0feb88409559a5dade2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
magicians = ['joe', 'bob', 'alberto'] | |
def show_magicians(magicians): | |
for magician in magicians: | |
print magician | |
''' 8-10. Great Magicians: Start with a copy of your program from Exercise 8-9. Write a function called make_great() | |
that modifies the list of magicians by adding the phrase the Great to each magician’s name. Call show_magicians() to see that the | |
list has actually been modified. ''' | |
def make_great(magicians): | |
for magician in magicians: | |
theGreat = magicians.pop() | |
return magicians.append(theGreat + ' the Great') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment