Answers for "how to remove everything except numbers and minus sign python"

1

python remove all except numbers

>>> import re
>>> re.sub('D', '', 'aas30dsa20')
'3020'
Posted by: Guest on April-29-2020
0

python remove everything except numbers from string

def AdvancedIn(in_string):
    res = ''.join(i for i in input(in_string) if i.isdigit())
    return res
Posted by: Guest on May-11-2021

Code answers related to "how to remove everything except numbers and minus sign python"

Python Answers by Framework

Browse Popular Code Answers by Language