How to remove digits from a string in Python

1 Answer

0 votes
s = '123python 98348programming 92389232language'

s = ''.join([i for i in s if not i.isdigit()])

print(s)


'''
run:

python programming language

'''

 



answered Jan 30, 2017 by avibootz
edited Mar 18, 2024 by avibootz

Related questions

1 answer 126 views
2 answers 466 views
1 answer 134 views
2 answers 215 views
1 answer 182 views
2 answers 140 views
...