-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path474A.py
More file actions
40 lines (31 loc) · 1.06 KB
/
Copy path474A.py
File metadata and controls
40 lines (31 loc) · 1.06 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
side = str(input(''))
dict_L = {'q': 'w', 'w': 'e', 'e': 'r',
'r': 't', 't': 'y', 'y': 'u',
'u': 'i', 'i': 'o', 'j': 'k',
'o': 'p', 'p': '[', '[': ']',
'a': 's', 's': 'd', 'd': 'f',
'f': 'g', 'g': 'h', 'h': 'j',
'k': 'l', 'l': ';', ';': "'",
'z': 'x', 'x': 'c', 'c': 'v',
'v': 'b', 'b': 'n', 'n': 'm',
'm': ',', ',': '.', '.': '/'}
dict_R = {']': '[', '[': 'p', 'p': 'o',
'o': 'i', 'i': 'u', 'u': 'y',
'y': 't', 't': 'r', 'r': 'e',
'e': 'w', 'w': 'q', '.': ',',
"'": ';', ';': 'l', 'l': 'k',
'k': 'j', 'j': 'h', 'h': 'g',
'g': 'f', 'f': 'd', '/': '.',
'd': 's', 's': 'a', ',': 'm',
'm': 'n', 'n': 'b', 'b': 'v',
'v': 'c', 'c': 'x', 'x': 'z',}
string = str(input(''))
string = string.lower()
result = ''
if side == 'R':
for items in string:
result = result + dict_R.__getitem__(items)
else:
for items in string:
result = result + dict_L.__getitem__(items)
print(result,end='')