1234567891011121314151617181920212223 |
- new_word = []
- with open("entree.txt","r") as source:
- for line in source:
- words = line.split()
- for word in words:
- word=word.replace("a","")
- word=word.replace("e","")
- word=word.replace("ë","")
- word=word.replace("i","")
- word=word.replace("o","")
- word=word.replace("u","")
- word=word.replace("y","")
- new_word.append(word)
- print(" ".join(new_word))
- with open("phrase.txt","w") as destination:
- destination.write(" ".join(new_word))
|