python

Python - String ,remove,delete,replace,extract numbers from string

# remove numbers from string
s = '12abcd405'
result = ''.join([i for i in s if not i.isdigit()])
Output
'abcd'

Remove numbers from a string

Was this helpful?