Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to translate to string to different alphabet python

string = 'some string'

normal_alphabet = 'abcdefghijklmnopqrstuvwxyz.'
my_alphabet = 'ijklmnopqrstuvwxyz.abcdefgh'

translation = string.maketrans(normal_alphabet, my_alphabet)

print(string.translate(translation))
Comment

PREVIOUS NEXT
Code Example
Python :: Django Check hashed Password 
Python :: falsy values in python 
Python :: how to create a countdown timer using python 
Python :: using tqdm in for loop 
Python :: bot wait_for discord py 
Python :: python put quotes in string 
Python :: 2 for loops at the same time in Python 
Python :: python 64 bit 
Python :: python print class variables 
Python :: swap list items in python 
Python :: sparse categorical cross entropy python 
Python :: save dataframe to a csv local file pyspark 
Python :: python fill string with 0 left 
Python :: how to add delay in python 
Python :: save and load a machine learning model using Pickle 
Python :: python input 
Python :: joblib 
Python :: UTC to ISO 8601: 
Python :: move file python 
Python :: pandas apply function to every row 
Python :: how to create empty series in pandas 
Python :: arch linux python 3.7 
Python :: python dict sort by value 
Python :: Python program to get the file size of a plain file. 
Python :: how to use virtual environment python 
Python :: python number and name of weekday 
Python :: iterate through attributes of class python 
Python :: python path from string 
Python :: Palindrome Check using for loop in python 
Python :: figsize param in pandas plot 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =