title: How to iterate through a list with a value from a dictionary
body: <p>I have a list with different values and a dictionary with different equations. I want to iterate with a <code>for</code>-loop through the list values and calculate a given equation. The example is below:</p>
  <pre><code>list = [1,2,3,4,5]
  d ={&quot;equation1&quot;: 2*x+3,
      &quot;equation2&quot;: 3+4*x}
  
  for x in list:
      y= d[&quot;equation1&quot;]
      print(y)
  </code></pre>
  <p>the output is as you can see below:</p>
  <pre><code>5
  5
  5
  5
  5
  </code></pre>
  <p>When I put the dictionary into the <code>for</code>loop like the sample below, the right values are calculated:</p>
  <pre><code>list = [1,2,3,4,5]
  
  
  for x in list:
      d ={&quot;equation1&quot;: 2*x+3,
          &quot;equation2&quot;: 3+4*x}
      
      y= d[&quot;equation1&quot;]
      print(y)
  </code></pre>
  <p>Result:</p>
  <pre><code>5
  7
  9
  11
  13
  </code></pre>
  <p>How can I realise the right results with the dictionary outside the <code>for</code>-loop?</p>