Oct-03-2018, 01:46 AM
i think i was thinking about collections.Counter when i was thinking there was a way to work with multiple things with the same key.
i don't think defaultdict will help much since a list in a regular dictionary can accomplish this,
but multidict might be the thing. any documentation on multidict? i am wondering if
i don't think defaultdict will help much since a list in a regular dictionary can accomplish this,
but multidict might be the thing. any documentation on multidict? i am wondering if
md.add('foo',42)
depends on 'foo' already being in there ... iow, do i have to do md['foo'] the first time. or was that coded just to show it could be added either way? maybe doing 2 one way and 2 the other way would show. will there be 4 instances of 'foo' keys in md?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.