Iterating over the data items in a dict.

Oleg Broytmann phd at phd.russ.ru
Mon Nov 6 12:20:23 EST 2000


On Mon, 6 Nov 2000, Syver Enstad wrote:
> I think you can do it like this:
>
> for key, value in dict.items:

for key, value in dict.items(): # it is a function - call it!

Oleg.
----
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list