Translate Message to Morse Code : <p>I am trying to translate a message into morse code. I am wondering how I can do this without typing a replace line (message = message.replace('a', '.-') for every single letter. Our instructor has provided us with this list of morse code to use. </p>

<pre><code>code = [["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","--.."]]
</code></pre>

<p>Thanks!</p>
