Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MORSE_CODE_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', '|': ' '}
- [print(MORSE_CODE_DICT[el], end='') for el in input().split()]
Advertisement
Add Comment
Please, Sign In to add comment