Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

replace number with string python

    x = re.sub(r"d+", "NUMB", str(x))       #Replaces digits with 'NUMB'
Comment

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)
Comment

PREVIOUS NEXT
Code Example
Python :: create exact window size tkinter 
Python :: how to submit two forms in django 
Python :: python library to convert decimal into octal and hexadecimal 
Python :: DIVAB 
Python :: strip() 
Python :: replace in lists py 
Python :: how to create tkinter window 
Python :: sklearn labelbinarizer in pipeline 
Python :: drop duplicates data frame pandas python 
Python :: roc auc score 
Python :: how to check uppercase in python 
Python :: how to create a string in python 
Python :: python googledriver download 
Python :: python __repr__ meaning 
Python :: python choose function 
Python :: tkinter add text to canvas 
Python :: python program to reverse a list 
Python :: ttktheme example 
Python :: perform zero crossing using openCV 
Python :: Python Print hour, minute, second and microsecond 
Python :: python script for downloading files from googledrive 
Python :: pygame pin to top 
Python :: series floor 
Python :: how to append dict to dict in python 
Python :: save artist animation puython 
Python :: sqlalchemy create engine Oracle 
Python :: python match case example 
Python :: python arabic web scraping 
Python :: pymongo dynamic structure 
Python :: python manage.py collectstatic 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =