Can I iterate over a dictionary outside a function ?

inshu chauhan insideshoes at gmail.com
Thu Apr 11 05:48:06 EDT 2013


I have a prog in which a functions returns a dict but when I try to iterate
over the dict using iterkeys, It shows an error. I think its because only
address of the dictionary is returned so cannot be iterated upon.

Please suggest some way by which it can be made possible to iterate over
the dictionary using  iterkeys outside the function ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130411/d292dfc6/attachment.html>


More information about the Python-list mailing list