title: using a string variable to reference a list in jinja2
body: <p>In a template, I have a string variable (list_name) that represents the name of a (dynamic) list whose name I don't know.</p>
  
  <p>For example, in regular Python I'd use:</p>
  
  <pre><code>list_name = "my_list"
  my_list = ["a","b"]
  
  for x in vars()[list_name]:
    print x
  </code></pre>
  
  <p>In Jinja, I would like to do:</p>
  
  <pre><code>{% for x in vars(list_name) %}
    ...
  {% endfor %}
  </code></pre>
  
  <p>but I cannot; vars(list_name) does not work. </p>