python - morse code to english python3 -
i want convert morse code english using python 3+ have managed convert english morse code using http://code.activestate.com/recipes/578407-simple-morse-code-translator-in-python/ but want convert morse code english i have attempted 1 charecter @ time, problem morse code letters not 1 charecter long english letters, e "." , s "...", problem have dictionary loop find "." , match e, instead of getting s "e e e" tried fix detecting spaces , doing word @ time, instead of looking letters in word searches entire word against dictionary i'm new python , dictionaries , don't know how differeniate between e "." , s "..." when searching dictionary here code # defines dictionary convert morse english code_reversed = {'..-.': 'f', '-..-': 'x', '.--.': 'p', '-': 't', '..---': '2', '....-': '4'