Created
May 13, 2014 15:58
-
-
Save erkyrath/c7bfa4a957abbde41561 to your computer and use it in GitHub Desktop.
Quick hack to look for Fiasco strategies
This file contains 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
import sys | |
ls = [] | |
while True: | |
ln = sys.stdin.readline() | |
if not ln: | |
break | |
ls.append(ln.strip().lower()) | |
print len(ls) | |
map = {} | |
for pos in range(8): | |
for wd in ls: | |
temp = wd[:pos] + '-' + wd[pos+1:] | |
if temp not in map: | |
map[temp] = [] | |
map[temp].append(wd) | |
temps = map.keys() | |
temps.sort(key = lambda temp: -len(map[temp])) | |
for temp in temps[:20]: | |
print map[temp] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment