how to translate to string to different alphabet python

Solutions on MaxInterview for how to translate to string to different alphabet python by the best coders in the world

showing results for - "how to translate to string to different alphabet python"
Angela
01 Aug 2019
1string = 'some string'
2
3normal_alphabet = 'abcdefghijklmnopqrstuvwxyz.'
4my_alphabet = 'ijklmnopqrstuvwxyz.abcdefgh'
5
6translation = string.maketrans(normal_alphabet, my_alphabet)
7
8print(string.translate(translation))
Claudio
11 Nov 2017
1text = input()
2
3def encrypt(t):
4    chars = list(text)
5    allowed_characters = list(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,.?!")
6
7    for char in chars:
8        for i in allowed_characters:
9            if char == i:
10                chars[chars.index(char)] = allowed_characters.index(i)
11    return chars
12
13print(encrypt(text))
queries leading to this page
how to encryptr data with pythonpython encrypt filehow to encrypt python projectmap all 26 capital letters to integers from 0 to 25 pythonpython encryptpython encrypt string with passwordencrypt with key pythonencrypt text in pythonnumber along with alphabets pythonencrypt a string pythonencrypted python codemap alphabet to numbers pythonhow to convert a string of letters and numbers to a listpython write alphabet from integerconvert letters to numbers pythonletter to number pythonencrypt string pythonpython encryptorhow to translate to string to different alphabet pythonnumber to letter of alphabet pythonalphabet to numbers python codepythnon letter to nu 2cberhow to get the alphabet order number in pythonpython encrypt string with keyencrypt pythonencrypt files with pythonpython encrypt codeencrypt with pythonhow to encrypt pythonencrypt file in pythonhow to encrypt a python programencrypt password pythonhow to put letters in number pythonhow to encrypt python sourcecodeencrypting messages using pythonpython convert letters to numbershow to encrypt a file in pythonpython encrypt based on valueencrypt library pythonpython code encryptorhow to map letter to numbers in pythonlist to replace letters with nukber alphabet pythontext encryption pythoncan i encrypt a python codeencrypt a file in pythonhow to encrypt python codenumber of letter in alphabet pythonhow to encrypt files with pythonpython encrypt a filehow to encrypt a python scriptpython convert letter to numberencrypt file python 3python letter to numberpython alphabet to numberpython pycrypto encrypt filereplace with alphabet position pythonhow do i replace number greater than 10 by a z in pythonletter to number py3python transform letter to numberpycryptodome encrypt fileconvert alphabet to number pythonhow to get ord aphabety of numbertext encrypt python with a keypython encrypyiontext encryptor pythonhow to encrypt on pythonhow to encrypt a text file pythonopenssl encrypt in pythonreplace alphabet with numbers pythonencrypt decrypt text with pythonpython encryptiohow to encrypt python filesencrypt file python python encrypt textpython how to encrypt a stringhow to encrypt in pythonencrypt with python with keypython encrypt stringhow to print all letters and numbers in pythonwrite a python program to encrypted datapython code to convert no to alphabet codeconvert letters to numbers in pythonpython encrpyt textpycrypto encrypt filepython encrypt with keycan i encrypt my python codeturn characters to alpgabetic numper pythonhow to encrypt a string pycryptodome e2 80 99sconvert a b c to 1 2 3 pythonpycryptodome pythonrun encrypted python codehow to translate to string to different alphabet python