@@ -0,0 +1,603 @@
+import collections%0Aimport re%0A%0Awith open(%22/usr/share/dict/words%22) as f:%0A%09words = %5Bw.strip() for w in f%5D%0A%0Adot = %22%5Bqwertyuiopasdfghjklzxcvbnm%5D%22%0Alastpat = %22%5E$%22%0Awhile True:%0A%09try: pat = input(%22Pattern%3E %22)%0A%09except EOFError: break%0A%09if pat == %22%22: break%0A%09if len(pat) %3E 1 and pat%5B0%5D != %22~%22: lastpat = pat%0A%09for ltr in pat:%0A%09%09if ltr.isalpha(): dot = dot.replace(ltr, %22%22)%0A%09regex = %22%5E%22 + lastpat.replace(%22.%22, dot) + %22$%22%0A%09w = %5Bw for w in words if re.match(regex, w)%5D%0A%09print(len(w), %22words%22)%0A%09if len(w) %3C 20: print(*w)%0A%09freq = collections.Counter(%22%22.join(w))%0A%09for l, c in freq.most_common(8):%0A%09%09if l in dot: print(l, c)%0A

Save a little hangman script, created as a demo but I didn't feel like deleting it