Ad
  • Custom User Avatar

    str_final+=MORSE_CODE[j] throws error because j == "" is not in dictionary. Where does j come from? for j in i. Where does i come from? for i in letters. How does letters array look when you call this function on " . "? letters == [["", ".", ""]].

  • Custom User Avatar

    Not an issue.

    You're trying to find "" in MORSE_CODE while there's no such key in it.