Does anyone have a Python3 program that can extract only the words with 10 constonants from a txt file?
This is what I have until now:
import sys
def main():
vowel = ['a','e','i','o','u']
vowel_count = 0
for line in sys.stdin:
line = line.rstrip()
for char in line:
if char == vowel:
vowel_count = vowel_count + 1
constonant_count = total_length_line - vowel_count
if constonant_count == 10:
print(line)