title: Jinja2 how to put variable inside jinja block?
body: <p>Hello I have an html file with code similar to this:</p>
  <pre><code>&lt;div class=&quot;form-group&quot;&gt;
                &lt;div class=&quot;input-group input-group-alternative&quot;&gt;
                  &lt;div class=&quot;input-group-prepend&quot;&gt;
                    &lt;span class=&quot;input-group-text&quot;&gt;&lt;i class=&quot;ni ni-key-25&quot;&gt;&lt;/i&gt;&lt;/span&gt;
                  &lt;/div&gt;
                  {{ form.abc1(placeholder=&quot;abc 1&quot;,class=&quot;form-control&quot;,type=&quot;password&quot;)}}
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class=&quot;form-group&quot;&gt;
                &lt;div class=&quot;input-group input-group-alternative&quot;&gt;
                  &lt;div class=&quot;input-group-prepend&quot;&gt;
                    &lt;span class=&quot;input-group-text&quot;&gt;&lt;i class=&quot;ni ni-time-alarm&quot;&gt;&lt;/i&gt;&lt;/span&gt;
                  &lt;/div&gt;
                  {{ form.abc2(placeholder=&quot;abc 2&quot;,class=&quot;form-control&quot;) }}
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class=&quot;form-group&quot;&gt;
                &lt;div class=&quot;input-group input-group-alternative&quot;&gt;
                  &lt;div class=&quot;input-group-prepend&quot;&gt;
                    &lt;span class=&quot;input-group-text&quot;&gt;&lt;i class=&quot;ni ni-time-alarm&quot;&gt;&lt;/i&gt;&lt;/span&gt;
                  &lt;/div&gt;
                  {{ form.abc3(placeholder=&quot;abc 3&quot;,class=&quot;form-control&quot;) }}
                &lt;/div&gt;
              &lt;/div&gt;
  </code></pre>
  <p>How could I make it so with a jinja for loop I can do something like the following python's solution:</p>
  <pre><code>i = 1
  while i &lt; 3:
    exec(f&quot;abc{i} = {i}&quot;)
    i += 1
  </code></pre>
  <p>basically I need to make abcs in the html code using a jinja loop</p>
  <pre><code>{% for element in abclist %}
  </code></pre>
  <p>and here be able to define the following:</p>
  <pre><code>{{ form.abc%element here%(placeholder=&quot;abc %element here%&quot;,class=&quot;form-control&quot;) }}
  </code></pre>