title: mapping characters from dict to a list of words
body: <p>I have a char dict and i want to replace every instance of a key i encounter in some word with its value.</p>
  <p>My dict looks like this:</p>
  <pre><code> map_to_num = {
          &quot;w&quot;: &quot;1&quot;,
          &quot;x&quot;: &quot;2&quot;,
          &quot;z&quot;: &quot;3&quot; }
  </code></pre>
  <p>And a list of words:</p>
  <pre><code>lst = [&quot;water&quot;,&quot;xavier&quot;]
  </code></pre>
  <p>I've tried using the <code>map()</code> function, but it keeps returning <code>None</code>:</p>
  <pre><code>nw = list(map(map_to_num.get, lst))
  </code></pre>