title: Loop through a Python list in Django template with for loop
body: <p>I need to simplify this Django template,</p>
  
  <pre><code>{{ var.1 }}
  {{ var.2 }}
  {{ var.3 }}
  {{ var.4 }}
  {{ var.5 }}
  </code></pre>
  
  <p>var is Python list passed as context to the template</p>
  
  <p>how do you convert the above template using a for tag construct.  I tried this but does not work.</p>
  
  <pre><code> {% for i in var|length %}
       {{ var.i }}
   {% endfor %}     
  </code></pre>