[BangPypers] Dictionary : An elementary question

Shashwat Anand anand.shashwat at gmail.com
Thu Aug 19 08:00:06 CEST 2010


On Thu, Aug 19, 2010 at 10:31 AM, Sahasranaman MS <sahasr at naman.ms> wrote:

>  On Thursday 19 August 2010 07:08 AM, Kenneth Gonsalves wrote:
>
>> On Wed, 2010-08-18 at 10:28 -0700, Anand Shankar wrote:
>>
>>> I have no clues. Any inputs??
>>>
>> sort order of dictionary keys is not guaranteed. Only a list will return
>> items in the same order as entered.
>>
> Python has an OrderedDict class from Python 3.1
> http://docs.python.org/dev/whatsnew/3.1.html#pep-372-ordered-dictionaries
> For older versions of python,  there are several other implementations that
> you could use.


OrderedDict = BST
Dict = HashTable


>
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
~l0nwlf


More information about the BangPypers mailing list