Find at least two common words with seven consonants in a row.
My program found (considering y as a vowel):
pgnttrp pgnttrp
substrstrata bstrstr
tsktsks tsktsks
But I think the first two entries are dictionary errors.
So the only one I found was tsktsks, which I think also is not really a word.
----------
import json
f = open(' path to my file ')
data = json.load(f)
words = data.keys()
vowels = ['a','e','i','o','u','y']
for w in words:
leng = len(w)
if leng < 7:
continue
for pos in range(0, leng-6):
substring = w[pos:pos+7]
if any(x in substring for x in vowels ):
continue
print(w, substring)
|
Posted by Larry
on 2024-07-10 08:05:48 |