turn characters to alpgabetic numper python

Solutions on MaxInterview for turn characters to alpgabetic numper python by the best coders in the world

showing results for - "turn characters to alpgabetic numper python"
Niko
03 May 2018
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))