python string remove non alphabetic characters code example
Example 1: python remove non letters from string
def nospecial(text):
import re
text = re.sub("[^a-zA-Z0-9]+", "",text)
return text
Example 2: python string exclude non alphabetical characters
regex = re.compile('[,\.!?]') #etc.