title: How to set vars in mako template?
body: <p>I want to be able to do create a variable "hasBannana" exists only within the mako template html that checks for certain things. Assume grocery and and store were passed in from the function that generated the template.</p>
  
  <pre><code>%for customer in store:
  
  hasBannana = false // Invalid syntax
  %for item in grocery:
  
  %if item == 'Bannana':
    hasBannana = true  // Invalid syntax
  %endif
  
  %if hasBannana: // Invalid syntax
    &lt;span&gt;Bought a Bannana&lt;/span&gt;
  %endif
  %end for
  </code></pre>
  
  <p>How do I correct this syntax? Is this even possible what I want to do?</p>