Answers for "replace number with string python"

0

replace number with string python

x = re.sub(r"\d+", "NUMB", str(x))       #Replaces digits with 'NUMB'
Posted by: Guest on April-16-2020
0

python string replace letters with numbers

from string import ascii_letters

code = code = "1111702460830000Lu05"
code = "".join([str(ascii_letters.index(c)) if c in ascii_letters else c for c in code])
print(code)
Posted by: Guest on December-06-2020

Code answers related to "replace number with string python"

Python Answers by Framework

Browse Popular Code Answers by Language