I wrote a python script that converts English to Entean language from an anime called The Devil is a part timer. I am sloppy at coding and know that the script can be made better.In the anime, the language in Ente Isla is called Entean, which is basically most of the consonants in the English alphabet switched around. Vowels and the consonants 'L', 'N', 'Q' keep their original position. ABCDEFGHIJKLMNOPQRSTUVWXYZ is changed to AZYXEWVTISRLPNOMQKJHUGFDCB.    For example, 'human' is 'tupan', and 'world' becomes 'foklx'. Here is the code:alphabet = ABCDEFGHIJKLMNOPQRSTUVWXYZ.lower()switched = AZYXEWVTISRLPNOMQKJHUGFDCB.lower()usr_txt = input(Enter Englsih text:)print(usr_txt)def get_letter(eng_letter):    if alphabet.find(letter):        if eng_letter.isupper():            alpha_place = alphabet.find(letter.lower())            return(switched[alpha_place].upper())        else:            alpha_place = alphabet.find(letter.lower())            return(switched[alpha_place])    else:        return(eng_letter)ent_word = ent_output = for word in usr_txt.split( ):     ent_word =     for letter in word:        ent_letter = get_letter(letter)        ent_word += ent_letter    ent_output +=   + ent_wordprint(ent_output.strip())If you interested the updated code can be found at https://github.com/Logmytech/English-to-Entean
Translating from English to Entean
python;strings;python 3.x;caesar cipher
The most idiomatic Python solution would be to use the str.translate() function, which solves exactly this problem.I don't see any reason to split the input into words, then join the results back together.  Just translate the entire string at once (where space maps to itself).