-
Notifications
You must be signed in to change notification settings - Fork 0
/
mono_decr.py
62 lines (53 loc) · 851 Bytes
/
mono_decr.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#付きは確定
arr = [
('e', 'a'),
('0', 'i'),
('!', 'o'),
('9', 'u'),
('f', 'n'),
('6', 'e'),
('1', 't'),
('>', 'k'),
('a', 's'),
('s', 'r'),
('y', 'y'),
('/', 'h'),
('w', 'm'),
('m', 'w'),
(';', 'd'),
(',', 'g'),
('p', 'z'),
('&', 'b'),
('?', 'p'),
('.', 'f'),
('h', 'v'),
('q', ''),
('z', ''),
('[', ''),
(']', ''),
('=', ''),
('*', ''),
('d', ''),
('(', ''),
(')', ''),
('-', ''),
('u', ''),
('j', ''),
('t', ''),
]
trans = {}
for (i, j) in arr:
if j != '':
trans[i] = j
with open('corps.txt') as f:
data = f.read()
out = ""
for i in data:
if i == '\n':
out += i
else:
if i in trans:
out += trans[i]
else:
out += " "
print(out)