Это то, что у меня есть на данный момент:
Код: Выделить всё
#Set up variables
alpha = ['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']
morse = ['.-','-...','-.-.','-..','.','..-.','--.','....','..','.---','-.-','.-..','--','-.','---','.--.','--.-','.-.','...','-','..-','...-','.--','-..-','-.--','--..']
#Get input from user
phrase = input('Enter a sentence to be converted to Morse Code')
Подробнее здесь: https://stackoverflow.com/questions/402 ... dictionary