title: mapping dictionary items and normalize them
body: <p>How can I build a function that receives a dictionary like:-</p>
  
  <pre><code>dic = {'a':0.4, 'b':0.2, 'c':0.1, 'd':0.5}
  </code></pre>
  
  <p>and a list of lists:-</p>
  
  <pre><code>l = [['a','red',1],['c','green', 4],['b','blue', 5]]
  </code></pre>
  
  <p>So that I can map the letters of the list in the dictionary and return their values normalized, like this:</p>
  
  <pre><code>result = sqrt((0.4^2) + (0.1^2) + (0.2^2))
  </code></pre>
  
  <p>This is my attempt:</p>
  
  <pre><code>from numpy.linalg import norm
  def normalizing(dic, l1):
      result = []
      for i in dic:
          if i in l1:
              result.append(dic[i])
      return norm(result)
  </code></pre>
  
  <p>returning 0.0   </p>
  
  <p>Your help is greatly appreciated!</p>