title: how do I set a list item by index in jinja2
body: <p>hello I want to set the value of an item in a list in jinja2, for that I'm trying</p>
  
  <pre><code>&lt;code&gt;
  {% set arr=[0,0,0,0,0,0,0,0] %}
  {% print arr %}
  {% set arr[1] = 1 %}
  {% print arr %}
  &lt;/code&gt;
  </code></pre>
  
  <p>but receive an error message saying:</p>
  
  <p>TemplateSyntaxError: expected token '=', got '['</p>
  
  <p>please any advice, thanks in advance</p>