-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTwiceRemovedSolver.py
84 lines (46 loc) · 1.55 KB
/
TwiceRemovedSolver.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import enchant
from itertools import permutations
import datetime
right_now = datetime.datetime.now().isoformat()
tlist = []
for i in right_now:
if i.isnumeric():
tlist.append(i)
tim = ("".join(tlist))
d = enchant.Dict("en_US")
wordstt = ["LORE", "HERO", "CANT", "SURE", "SELL", "KINE", "PEON", "LICE", "ALTI", "RISE", "LINK", "LIRA", "IMAM", "FONE", "CALM", "FENCE", "CONIC", "NURSE", "VALES", "RETAG", "STAMP", "ALTER", "DEBATE", "THETICAL"]
conlst = ["B", "C", "D", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "V", "W", "X", "Z"]
vowlst = ["A", "E", "I", "O", "U", "Y"]
wiff = []
for elem in conlst:
for elem2 in vowlst:
wiff.append([elem, elem2])
wiff.append([elem2, elem])
solvlst = []
for wd in wordstt:
elemlst = []
z = len(wd) + 4
y = len(wd) + 2
minilst = []
for bam in wiff:
sublst = []
for el in wd:
sublst.append(el)
sublst.append(bam)
sublst.append(bam)
elemlst.append(sublst)
wigg = list(permutations(sublst, y))
for trob in wigg:
teststr = ""
for lat in trob:
if len(lat) == 1:
teststr += lat
if len(lat) == 2:
teststr += lat[0]
teststr += lat[1]
if d.check(teststr) and teststr not in minilst:
print(teststr)
minilst.append(teststr)
solvlst.append(minilst)
print(solvlst)
## THE GHOST OF THE SHADOW ##