-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdict.py
More file actions
21 lines (18 loc) · 881 Bytes
/
dict.py
File metadata and controls
21 lines (18 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
text_to_morse_dict = {
' ': '/',
'a': '.-', 'b': '-...', 'c': '-.-.', 'd': '-..',
'e': '.', 'f': '..-.', 'g': '--.', 'h': '....',
'i': '..', 'j': '.---', 'k': '-.-', 'l': '.-..',
'm': '--', 'n': '-.', 'o': '---', 'p': '.--.',
'q': '--.-', 'r': '.-.', 's': '...', 't': '-',
'u': '..-', 'v': '...-', 'w': '.--', 'x': '-..-',
'y': '-.--', 'z': '--..',
'0': '-----', '1': '.----', '2': '..---', '3': '...--',
'4': '....-', '5': '.....', '6': '-....', '7': '--...',
'8': '---..', '9': '----.',
'.': '.-.-.-', ',': '--..--', '?': '..--..', '!': '-.-.--',
':': '---...', ';': '-.-.-.', '-': '-....-', '/': '-..-.',
'(': '-.--.', ')': '-.--.-', '"': '.-..-.', "'": '.----.',
'=': '-...-', '+': '.-.-.', '@': '.--.-.'
}
morse_to_text_dict = {v: k for k, v in text_to_morse_dict.items()}