Skip to content

Description:

  • Dict-like collection of key-value pairs where key might occur more than once in the container. It behaves mostly like a regular dict but it may have several values for the same key and preserves insertion ordering.

Resources:

Create a mutable mapping

from multidict import CIMultiDict
dct = CIMultiDict(key='val')
'Key' in dct

Create a dict with repeating key values

from multidict import MultiDict
new_dct = MultiDict([('a', 1), ('b', 2), ('b', 3),
('c', 5), ('d', 4), ('c', 7)])
new_dct

ganymede is made by Eugo