title: Length of string in Jinja/Flask
body: <p>Jinja unfortunately does not support executing arbitrary Python code, such as</p>
  
  <pre><code>{% if len(some_var)&gt;1 %} ... {% endif %}
  </code></pre>
  
  <p>My current workaround is to use the deprecated, ugly, double-underscore method:</p>
  
  <pre><code>{% if some_var.__len__()&gt;1 %} ... {% endif %}
  </code></pre>
  
  <p>Although this works, I'm afraid that some future implementation of strings might break this code. Is there a better way to do this?</p>