You can use regular python in jinja tags. The obvious choice for some simple cases is str.join :
>>> jinja2.Template(r'{{ " ".join(bar) }}').render(bar='baz') u'b a z'.
You can also iterate over sequences in jinja with a for block:
>>> jinja2.Template(r'{% for quux in bar %}{{ quux }} {% endfor %}').render(bar='baz') u'b az '
SingleNegationElimination
source share