Answers for "convert letters to numbers in python"

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

Code answers related to "convert letters to numbers in python"

Python Answers by Framework

Browse Popular Code Answers by Language