Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
python remove all except numbers
Gilbert
Programming language:
Python
2021-04-13 18:45:28
0
Q:
python remove all except numbers
Jdamian
Code:
Python
2021-06-11 13:16:07
>>> import re >>> re.sub('\D', '', 'aas30dsa20') '3020'
2
Tags
number
python
remove
Related
remove first occurrence of element from list python
python remove repeated elements from list
how to remove all decimals from a number python
python list remove all elements
delete all elements in list python
python remove multiple elements from list
remove all integers from list python
python find first duplicate numbers
python remove duplicate numbers
remove substring python
remove all of same value python list
remove from list if not maches in list
delete an element by value from a list if it made of white spaces python
remove value from python list by value
remove consecutive duplicates python
python list remove multiple elements
python remove \n form list
python remove first element from list
python remove duplicates words from string
New to Communities?
Join the community