Created
November 28, 2012 16:19
-
-
Save J12D/4162301 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def slim_shady(shadylist): | |
# slim_shady takes a list of Slim Shadies, returns Real Slim Shady, if exists | |
for shady in shadylist: | |
print "Won't the real Slim Shady please stand up?" | |
if shady == "Slim Shady": | |
# it's safe to return here, because it's clear that any remaining | |
# shadies in this sequence are just imitating | |
return shady | |
return None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment