Skip to content

Instantly share code, notes, and snippets.

@J12D
Created November 28, 2012 16:19
Show Gist options
  • Save J12D/4162301 to your computer and use it in GitHub Desktop.
Save J12D/4162301 to your computer and use it in GitHub Desktop.
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