एक dictionary (map, associative array) ले key → value सम्बन्धहरु भण्डार गर्छ, जसले तपाईलाई यसको key द्वारा value लाई average O(1) मा हेर्न दिन्छ। एक set अनिवार्य रूपमा keys सहितको एक map हो तर कुनै मान छैन — यो केवल सदस्यता भण्डार गर्छ।
उदाहरण
python
text = .split()
counts = {}
word text:
counts[word] = counts.get(word, ) +
ages = {: , : }
ages[]
ages[] =
ages
