(message)
| 69 | |
| 70 | |
| 71 | def morseToEnglish(message): |
| 72 | message = message.split(' ') |
| 73 | english = [] # Make a list of English letters from the morse code. |
| 74 | for code in message: |
| 75 | if code in MORSE_TO_ENGLISH: |
| 76 | english.append(MORSE_TO_ENGLISH[code]) |
| 77 | return ''.join(english) |
| 78 | |
| 79 | |
| 80 | # If the program is run (instead of imported), run the game: |