5
I’m trying to make a program in Python 3 that should turn the typed text into upper box and remove blanks. I would like to know what is wrong with my code since it is not eliminating the whitespace. I have tested two codes.
First code:
print ("-"*50) print ("-"*50) frase = input("\nEscreva uma frase: ") frase = frase.upper() frase = frase.strip() print ("\n",frase) print ("-"*50) print ("-"*50)
Second Code
print ("-"*50) print ("-"*50) frase = input("\nEscreva uma frase: ") frase = frase.upper() frase = frase.replace('','') print ("\n",frase) print ("-"*50) print ("-"*50)
Thank you. It helped a lot.
– Rodrigo Ferraz