Skip to content

Instantly share code, notes, and snippets.

View rrggrr's full-sized avatar

Russ Ross rrggrr

View GitHub Profile
def cleanText(text):
exclude = [")","(",'.','-',':','"',"'",",","&","$",u'"',u"'",";",u"&","`","’"]
#dd = {ord(c):None for c in badchars}
#tx = text.translate(dd)
#tx = text.translate(string.punctuation)
#print(text)
text = ''.join(ch for ch in text if ch not in exclude)
text = str(text)
return text