title: Python index value as element value
body: <p>I am using <code>jinja2</code> to template a few different types of file reading the values from an <code>.ini</code> file.</p>
  
  <p>After loading the values I am trying to loop over the list of tuples I created that matches the element values and using <code>jinja</code> resolve the template and stream it to an output file.</p>
  
  <p><code>.ini</code> file example</p>
  
  <pre><code>    [COMMON]
      env = example
  
      [EXAMPLE]
      value1=abc
      value2=xyz
      value3=123
  </code></pre>
  
  <p>list of tuples </p>
  
  <pre class="lang-py prettyprint-override"><code>    d = [('COMMON', 'env'),
           ('EXAMPLE', 'value1'),
           ('EXAMPLE', 'value2'),
           ('EXAMPLE', 'value3')]
  </code></pre>
  
  <p>Loading <code>jinja</code> template   </p>
  
  <pre class="lang-py prettyprint-override"><code>    file_loader = FileSystemLoader(fs)
      e = Environment(loader=file_loader)
      template = e.get_template(tpl)
  </code></pre>
  
  <p>Iterating of list of tuples</p>
  
  <pre class="lang-py prettyprint-override"><code>    for i in d:
         template.stream(i[1]=parser.get(i[0], i[1])).dump('output.txt')
  </code></pre>
  
  <p>The code fails when trying to use the loop index as the element value which is what I am trying to achieve.
  If the element is a matching value of one in the list it works but then I need to have it in both places ie <code>env=parser.get(i[0], i[1]))</code></p>