Created
April 19, 2018 12:35
-
-
Save Fhernd/85b20f6df00e70273d5a5cb1b569263d to your computer and use it in GitHub Desktop.
Remover caracteres de un texto. OrtizOL.
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
import re | |
texto = '\t OrtizOL Blog \n ' | |
print(texto.strip()) | |
print(texto.lstrip()) | |
print(texto.rstrip()) | |
print(texto.replace(' ', '')) | |
print(re.sub('\s+', ' ', texto)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment