python remove all except numbers
>>> import re
>>> re.sub('\D', '', 'aas30dsa20')
'3020'
python remove all except numbers
>>> import re
>>> re.sub('\D', '', 'aas30dsa20')
'3020'
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us