python how to get rid of non alpha characters code example
Example: python string strip non alphanumeric
Regular expressions to the rescue:
import re
stripped_string = re.sub(r'\W+', '', your_string)
Regular expressions to the rescue:
import re
stripped_string = re.sub(r'\W+', '', your_string)