Skip to content

Instantly share code, notes, and snippets.

@Miserlou
Created February 14, 2012 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Miserlou/1830843 to your computer and use it in GitHub Desktop.
Save Miserlou/1830843 to your computer and use it in GitHub Desktop.
Django Dictionary
<ul>
{% for key, value in dictionary.items %}
<li><a href="{{key}}">{{value}}</a></li>
{% endfor %}
</ul>
@luvpreetsingh
Copy link

What if the list elements are also lists and one wants to parse on the elements of the list(which itself is element of the parent list)
for example,
a=[[1,2],[3,4]]

how do i parse over [1,2] ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment