title: Interpret an HTML form value as a list in a Flask view
body: <p>I want to set a hidden form field to a list of values, then use the list when the form is submitted.  However, the value seems to be a string instead of a list.  How do I use get list I passed to the form as a list?</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form method="POST" action="{{ url_for('action') }}"&gt;
      &lt;input type="hidden" name="list" value="{{ some_list }}"/&gt;
      &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  
  
  <pre><code>@app.route('/action', methods=['POST'])
  def action():
      elements = request.form['list']
      list_length = len(elements)
      ...
  </code></pre>