Last active
December 16, 2015 16:40
-
-
Save felipecabargas/5464969 to your computer and use it in GitHub Desktop.
Módulo y programa para reemplazar puntuación por espacios.
This file contains hidden or 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
from reemplazar import borrarpuntuacion | |
entrada = raw_input(">>>") | |
print borrarpuntuacion(entrada) |
This file contains hidden or 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
def borrarpuntuacion(lin,signos = [".",",",";","(",")",'"']): | |
largo = len(lin) | |
for indice in range(largo): | |
if lin[indice] in signos: | |
lin= lin.replace(lin[indice],' ') | |
return lin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Place both files in the same directory