Answer the question
In order to leave comments, you need to log in
How to organize the storage of objects by key?
Good afternoon.
There is a set of objects with unique identifiers.
Objects are stored as a dict, with a set of properties. For example:
obj = {"color": "red", "type":"inner", "id": "WE324"}
You need to store them and retrieve them using a unique key. How to do it?
Previously, they were added to the list and instead of the key there was their serial number in this very list, but refused such a solution.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question