Answers for "convert alphabet to number python"

1

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))
Posted by: Guest on December-29-2020
0

turn characters to alpgabetic numper python

text = input()

def encrypt(t):
    chars = list(text)
    allowed_characters = list(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,.?!")

    for char in chars:
        for i in allowed_characters:
            if char == i:
                chars[chars.index(char)] = allowed_characters.index(i)
    return chars

print(encrypt(text))
Posted by: Guest on December-13-2020
0

python alphabet to number

"17#123#5621#"
Posted by: Guest on June-02-2021

Code answers related to "convert alphabet to number python"

Python Answers by Framework

Browse Popular Code Answers by Language