1>>> s = '12abcd405'
2>>> result = ''.join([i for i in s if not i.isdigit()])
3>>> result
4'abcd'
5
1no_digits = []
2# Iterate through the string, adding non-numbers to the no_digits list
3for i in s:
4 if not i.isdigit():
5 no_digits.append(i)
6
7# Now join all elements of the list with '',
8# which puts all of the characters together.
9result = ''.join(no_digits)
10