Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
replace number with string python
Gindi
Programming language:
Python
2021-06-22 06:11:46
0
Q:
replace number with string python
le_m
Code:
Python
2021-06-06 19:17:36
x = re.sub(r"\d+", "NUMB", str(x)) #Replaces digits with 'NUMB'
0
Tags
number
string
python
replace
string python
Related
python string replace
python replace regex
set replace python
how to replace a certain substring in python
python replace string in file
python replace newline
python replace string
python replace
python replace variable in string
replace url with text python
python replace char in string
python string replace index
replace function in python
python replace "\" for "/"
python replace all occurrences in string
python find and replace string in file
replace() python
replacing spaces in a string python
New to Communities?
Join the community