remove alphanumeric characters from string python isalpha 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)