I am still on Django tutorial and currently here:
def display_meta(request):
values = request.META.items()
values.sort()
html = []
for k, v in values:
html.append('<tr><td>%s</td><td>%s</td></tr>' % (k, v))
return HttpResponse('<table>%s</table>' % '\n'.join(html))
I understand what it is meant to do:
Display the Meta Data on a Http request in a html document.
What I dont understand is in
for k, v in values:
what k, v are standing for.
Any suggestions?
Thanks a lot
L.
Is the method of iterating a Python dictionary
{'key':value, ...}kis the key andvis its value.