KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Can we know the position of items in Python's ordered dictionary? For example: If I have dictionary: // Ordered_dict is OrderedDictionary Ordered_dict = {"fruit": "banana", "drinks": "water", "animal": "cat"} Now how do I know in which position cat belongs to? Is it possible to get an answer like: position (Ordered_dict["animal"]) = 2 ? or in some other way?
Tags (comma-separated)
Save Edits
Cancel