Created
March 7, 2012 18:09
-
-
Save RobSpectre/1994737 to your computer and use it in GitHub Desktop.
My submission to moviesascode.net - most disgusting piece of code I've written
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
class Human(object): | |
def eat(self, food): | |
pieces = food.split() | |
if pieces: | |
pieces.pop() | |
return ''.join([piece.replace(piece, "poop ") for piece in | |
pieces]).strip() | |
katsuro = Human() | |
lindsay = Human() | |
jenny = Human() | |
human_centipede = [katsuro] | |
human_centipede.append(lindsay) | |
human_centipede.append(jenny) | |
dinner = reduce(lambda food, link: link.eat(food), human_centipede, | |
"Disgusting bowl of dog food.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment