Skip to content

Instantly share code, notes, and snippets.

@christiancost47
Last active August 22, 2019 17:45
Show Gist options
  • Save christiancost47/df84c612b6e1b4079adbef7a2748dc51 to your computer and use it in GitHub Desktop.
Save christiancost47/df84c612b6e1b4079adbef7a2748dc51 to your computer and use it in GitHub Desktop.
strip
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