remove alphabet and special characters from list python code example
Example 1: python remove special characters from list
import re
my_list= ["on@3", "two#", "thre%e"]
print [re.sub('[^a-zA-Z0-9]+', '', _) for _ in my_list]
Example 2: remove alphabetic characters python
numeric_answer = filter(str.isdigit, original_string)
numeric_answer = "".join(numeric_answer)