这是我的代码:
morse_code = {}
morse_code["A"] = "* _"
morse_code["B"] = "_ * * *"
morse_code["C"] = "_ * _ *"
morse_code["D"] = "_ * *"
morse_code["E"] = "*"
morse_code["F"] = "* * _ *"
morse_code["G"] = "_ _ *"
morse_code["H"] = "* * * *"
morse_code["I"] = "* *"
morse_code["J"] = "* _ _ _"
morse_code["K"] = "_ * _"
morse_code["L"] = "* _ * *"
morse_code["M"] = "_ _"
morse_code["N"] = "_ *"
morse_code["O"] = "_ _ _"
morse_code["P"] = "* _ _ *"
morse_code["Q"] = "_ _ * _"
morse_code["R"] = "* _ *"
morse_code["S"] = "* * *"
morse_code["T"] = "_"
morse_code["U"] = "* * _"
morse_code["V"] = "* * * _"
morse_code["W"] = "* _ _"
morse_code["X"] = "_ * * _"
morse_code["Y"] = "_ * _ _"
morse_code["Z"] = "_ _ * *"
morse_code[" "] = " | "
phrase = "BOTH FICKLE DWARVES JINX MY PIG QUIZ."
我如何能够打印消息,用“莫尔斯电码”切换字母表中的字母