strip alpha characters in python strng code example
Example 1: python strip non numeric in string
>>> import re
>>> re.sub("[^0-9]", "", "sdkjh987978asd098as0980a98sd")
'987978098098098'
Example 2: remove alphabetic characters python
numeric_answer = filter(str.isdigit, original_string)
numeric_answer = "".join(numeric_answer)