Skip to content

Instantly share code, notes, and snippets.

@luxu
Created February 22, 2022 15:08
Show Gist options
  • Save luxu/2a1484bb5d242e809183814323ca220e to your computer and use it in GitHub Desktop.
Save luxu/2a1484bb5d242e809183814323ca220e to your computer and use it in GitHub Desktop.
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