string = 'some string' normal_alphabet = 'abcdefghijklmnopqrstuvwxyz.' my_alphabet = 'ijklmnopqrstuvwxyz.abcdefgh' translation = string.maketrans(normal_alphabet, my_alphabet) print(string.translate(translation))