Skip to content

Instantly share code, notes, and snippets.

@madranet
Created December 18, 2016 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madranet/979ccf28afa10e8b317f7ec49d018d95 to your computer and use it in GitHub Desktop.
Save madranet/979ccf28afa10e8b317f7ec49d018d95 to your computer and use it in GitHub Desktop.
#try alt morse
print("\n===========================================================")
print("OPTION02 —ALT MORSE")
print("===========================================================\n")
for section in message:
#take 3 letters at a time and convert to morse
#join 3 morse letters together to create braille letter
brailleletter = (altmorse[section[0]]+altmorse[section[1]]+altmorse[section[2]])
#lookup braille letter
try:
print((list(braille.keys())[list(braille.values()).index(brailleletter)]),end="")
#if it doesn't exist, print '?'
except:
print("?",end="")
print("\n\n===========================================================\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment