1string = 'some string'
2
3normal_alphabet = 'abcdefghijklmnopqrstuvwxyz.'
4my_alphabet = 'ijklmnopqrstuvwxyz.abcdefgh'
5
6translation = string.maketrans(normal_alphabet, my_alphabet)
7
8print(string.translate(translation))
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))