Is there a structure in Python
which supports similar operations to C++ STL map
and complexity of operations correspond to C++ STL map
?
Python SortedDict is a similar to C++ STL map. You can read about it here or here.
SortedDict is a container of key-value pairs in which an order is imposed on the keys according to their ordered relation to each other. As with Python’s built-in dict data type, SortedDict supports fast insertion, deletion, and lookup by key.