ciphers.morse_code

Python program to translate to and from Morse code.

https://en.wikipedia.org/wiki/Morse_code

Attributes

MORSE_CODE_DICT

REVERSE_DICT

Functions

decrypt(→ str)

encrypt(→ str)

main(→ None)

Module Contents

ciphers.morse_code.decrypt(message: str) str
>>> decrypt('... --- ... -.-.--')
'SOS!'
ciphers.morse_code.encrypt(message: str) str
>>> encrypt("Sos!")
'... --- ... -.-.--'
>>> encrypt("SOS!") == encrypt("sos!")
True
ciphers.morse_code.main() None
>>> s = "".join(MORSE_CODE_DICT)
>>> decrypt(encrypt(s)) == s
True
ciphers.morse_code.MORSE_CODE_DICT
ciphers.morse_code.REVERSE_DICT