Created
February 22, 2022 15:08
-
-
Save luxu/2a1484bb5d242e809183814323ca220e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file = '../poema.txt' | |
with open(file, 'r', encoding='utf-8') as _f: | |
texto = _f.readlines() | |
novo_texto = [] | |
vogais = ["a", "e", "i", "o", "u"] | |
for linha in texto: | |
for letra in linha: | |
if letra in vogais: | |
novo_texto.append("*") | |
else: | |
novo_texto.append(letra) | |
print("".join(novo_texto)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment