title: Django - How do I Iterate through a list of dictionaries to concatenate values from a same element
body: <p>I have a list of dictionaries as follows:</p>
  
  <pre><code>listDict = [{'product':'sandwich','price':'5200'}, {'product':'hamburger','price':'3000'}]
  </code></pre>
  
  <p>to iterate through the elements i do:</p>
  
  <pre><code>{%for element in listDict%}
      {% for key,value in element.items %}
          &lt;input type="checkbox" name = "bar" value = "{{ value }}"&gt;{{ value }}&lt;br&gt;
      {% endfor %}
  {% endfor %}                    
  </code></pre>
  
  <p>this, as expected, will print:</p>
  
  <pre><code>sandwich
  
  5200
  
  hamburger
  
  3000
  </code></pre>
  
  <p>but how could I concatenate the values in order to print something like this:</p>
  
  <pre><code>sandwich - 5200
  
  hamburger - 3000
  </code></pre>
  
  <p>I can't do something like below:</p>
  
  <pre><code>for element in listDict:
      element['product']+" - "+element['price']
  </code></pre>
  
  <p>Thanks in advance!</p>