title: Fetching and evaluating data from several dictionaries using filter,reduce,add,map
body: <p><strong>Fetching and evaluating data from several dictionaries using filter,reduce,add,map</strong><br>
  I would like to calculate the following:<br></p>
  
  <ol>
  <li>Filter each category, take the values of the keys (t1,t2,t3..) </li>
  <li>take out the values of 'a','b'.</li>
  <li>add from Addons to each value in the same category </li>
  <li><p>multiply each one</p>
  
  <p>result = ((80+5)*2.5 + (95+5)*4 + (75+3)*3.5 + (58+10)*5)</p></li>
  </ol>
  
  <p><br></p>
  
  <p>The Data to work with:     </p>
  
  <pre><code>Values = {'b': 95, 'c': 75, 'a': 80, 'd': 58}
  Multipliers = {'b': 4, 'c': 3.5, 'a': 2.5, 'd': 5}
  Addons = {'t1':5, 't2':3, 't3':10} 
  Category = {'t1':('a', 'b'), 't2':('c',), 't3':('d',)}
  </code></pre>
  
  <p>what I did so far is to filter each category that correspond to Addons,now I`m just able to print it:<br></p>
  
  <pre><code>reduce(add,map(lambda x,y: x[1],filter(lambda t: t[0] in Addons, Category.items())))
  </code></pre>
  
  <p><br>
  Any suggestions? Thanks.</p>