dictionary

Benjamin Kaplan benjamin.kaplan at case.edu
Mon Apr 26 14:26:36 EDT 2010


On Mon, Apr 26, 2010 at 2:04 PM, gopi krishna <dasarathulagopi at gmail.com>wrote:

> When I give a dictionary with key and value in order how can get back  iy
> in same order
>
>
You can't using the standard dict type. If you're using Python 3.1, you can
use collections.OrderedDict instead. Otherwise, you'll just have to define
the type yourself. You can find the code for it all over the place if you
search for "python ordered dict".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100426/bbce16ba/attachment-0001.html>


More information about the Python-list mailing list