I have a string like
'Dogs are highly5 variable12 in1 height and weight. 123'
and I want to get
'Dogs are highly variable in height and weight. 123'
How can I do this?
Here's my existing code:
somestr = 'Dogs are highly5 variable12 in1 height and weight. 123'
for i, char in enumerate(somestr):
if char.isdigit():
somestr = somestr[:i] + somestr[(i+1):]
but it returns
'Dogs are highly variable1 n1 hight and weight. 123'