Last active
August 22, 2019 17:45
-
-
Save christiancost47/df84c612b6e1b4079adbef7a2748dc51 to your computer and use it in GitHub Desktop.
strip
This file contains 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
texto = " Simples é melhor que complexo " | |
print(texto.rstrip()) #remove espaço em branco do lado direito | |
>>> Simples é melhor que complexo | |
print(texto.lstrip()) #remove espaço em branco do lado esquerdo | |
>>>Simples é melhor que complexo_ | |
print(texto.strip()) #remove espaço em branco dos dois lados | |
>>>Simples é melhor que complexo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment