Skip to content

Instantly share code, notes, and snippets.

@RobSpectre
Created March 7, 2012 18:09
Show Gist options
  • Save RobSpectre/1994737 to your computer and use it in GitHub Desktop.
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
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