Created
May 6, 2013 17:48
-
-
Save leeavital/5526756 to your computer and use it in GitHub Desktop.
The Most Important Problem in the History of Cutlery Science
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
from itertools import permutations, combinations | |
chopsticks = ["ch", "op", "st", "icks"] | |
spoon = ["sp", "oon"] | |
fork = ["f", "ork"] | |
knife = ["k", "ni", "fe"] | |
"chopsticks" | |
"spoon" | |
"fork" | |
"knife" | |
for c in chopsticks: | |
for s in spoon: | |
for f in fork: | |
for k in knife: | |
for x in combinations( (c, s, k, f), 4 ): print "".join(x) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment