PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#created by Izaiah kay
#insert a piece of text to encrypt
#numbers and special characters remain unchanged
#for example "bed123#" is encrypted to "245123#"
import string
def get_index(x):
lc = list(string.ascii_lowercase)
uc = list(string.ascii_uppercase)
if x in lc:
return lc.index(x)+1
if x in uc:
return uc.index(x)+1
return x
input =input()
output_list = [ str(get_index(x)) for x in list(input)]
print(''.join(output_list))
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run