title: Check every value for each similar keys whether it meets the condition for each key in 2 dict - PYTHON
body: <p>I have these datas in 2 dictionaries.</p>
  <pre><code>dict1 = {&quot;A&quot;:2, &quot;B&quot;: 2, &quot;C&quot;:2}
  dict2 = {&quot;A&quot;:2, &quot;B&quot;:100, &quot;C&quot;:100)
  </code></pre>
  <p>I check values for each keys whether values in dict1 is more than values in dict2.
  Example:</p>
  <pre><code>if dict1[&quot;A&quot;]&gt;=dict2[&quot;A&quot;]:
     print(&quot;There are enough A parts&quot;)
  if dict1[&quot;B&quot;]&gt;=dict2[&quot;B&quot;]:
     print(&quot;There are enough B parts&quot;)
  </code></pre>
  <p>Is there a way for me to check all values between the 2 dictionaries without having to do the above?
  Here's how it is for better understanding:</p>
  <pre><code>dict1={}
  dict2 = {&quot;A&quot;:2, &quot;B&quot;:100, &quot;C&quot;:100}
  productID= &quot;ABBB&quot; #productID
  quantityInput = 100
  quantityToMake = productID*quantityInput #results in ABBB x100 times
  
   *** PROGRAM RUNS through each letter and update how many A and Bs are there and updates dict1
  </code></pre>
  <p>I'm stuck here. The condition is, if I have enough of the parts ie A,B,C,D, as in the case above,
  I have enough of &quot;A&quot; to make only 2 &quot;ABBB&quot;.</p>
  <p>If we have the dict2 values for each key as below:</p>
  <pre><code>dict2 = {&quot;A&quot;:100, &quot;B&quot;:2, &quot;C&quot;:100}
  </code></pre>
  <p>I don't have enough B to make 1 &quot;ABBB&quot; since we need 3 &quot;B&quot; to make 1 &quot;ABBB&quot;.</p>
  <p>Your help is much appreciated. Quite new to python.</p>
  <p>Thanks!</p>