Posts by Miguel Souza • 11 points
1 post
-
0
votes3
answers75
viewsQ: Why is my code "swallowing" string on a list?
letras = ["A", "B", "C", "B"] vogais = ["a", "e", "i", "o", "u"] for letra in letras: if letra.lower() in vogais: print(letra.upper()) letras.remove(letra) elif letra.lower() not in vogais:…