tags:

views:

13

answers:

1

Hi

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.

+1  A: 

Is the method of iterating a Python dictionary {'key':value, ...}

k is the key and v is its value.

Oli
Thank you very much!
MacPython