title: Subtract one each time you iterate a twig loop
body: <p>I have to make a list of rating stars in twig, but I do not find how to subtract one each time I iterate the loop so that it shows one less star in the list.</p>
  
  <p>I have the following code:</p>
  
  <pre class="lang- prettyprint-override"><code>&lt;ul&gt;
      {% for input in 0..3 %}
          &lt;li&gt;
              &lt;input type="radio" name="stars" /&gt;
              &lt;label&gt;
                  {% for i in 0..4 %}
                      &lt;span&gt;&lt;/span&gt;
                  {% endfor %}
                  {% if input &gt;= 1 %} &lt;span class="stars"&gt;and more&lt;/span&gt;{% endif %}
              &lt;/label&gt;
          &lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  </code></pre>
  
  <p>The stars are made in CSS, so I need the second loop to show one less star each time it iterates.</p>