On Nov 9, 2:27 pm, Peter Otten __pete...@web.de wrote:
J Wolfe wrote:
I would like to sort this dictionary by the values of the inner
dictionary ‘ob’ key.
Python's built-in dictionary is unsorted by design.
mydict =
{’WILW1′: {’fx’: ‘8.1′, ‘obtime’: ‘2009-11-07 06:45:00′, ‘ob’:
J Wolfe wrote:
I would like to sort this dictionary by the values of the inner
dictionary ‘ob’ key.
Python's built-in dictionary is unsorted by design.
mydict =
{’WILW1′: {’fx’: ‘8.1′, ‘obtime’: ‘2009-11-07 06:45:00′, ‘ob’: ‘6.9′},
‘GRRW1′: {’fx’: ‘12.8′, ‘obtime’: ‘2009-11-07 04:15:00′,
On Mon, 09 Nov 2009 06:02:09 -0800, J Wolfe wrote:
Hi,
I would like to sort this dictionary by the values of the inner
dictionary ‘ob’ key.
You can't sort dictionaries in Python, because they are unordered hash
tables. Giving up the ability to store items in order is one of the
things