Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
nested dictionary
#2
Dictionaries don't sort. The best you could do is use collections.OrderedDict. However, that doesn't sort either, it just remembers the order items were inserted. You you would need to extract the items to a list, so the list, and then enter them in order into the OrderedDict.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
nested dictionary - by Maxime - Mar-13-2019, 07:11 PM
RE: nested dictionary - by ichabod801 - Mar-13-2019, 07:16 PM
RE: nested dictionary - by Maxime - Mar-13-2019, 07:21 PM
RE: nested dictionary - by perfringo - Mar-14-2019, 07:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Looping to Create Nested Dictionary gngu2691 10 33,969 Jun-22-2018, 04:11 PM
Last Post: anickone

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020