intersection, union, difference, symmetric difference for dictionaries
MRAB
python at mrabarnett.plus.com
Tue Feb 25 18:25:06 EST 2014
More information about the Python-list mailing list
Tue Feb 25 18:25:06 EST 2014
- Previous message (by thread): intersection, union, difference, symmetric difference for dictionaries
- Next message (by thread): intersection, union, difference, symmetric difference for dictionaries
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2014-02-25 23:14, Ben Finney wrote: > MRAB <python at mrabarnett.plus.com> writes: > >> On 2014-02-25 21:27, Ben Finney wrote: >> > Peter Otten <__peter__ at web.de> writes: >> > >> >> mauro wrote: >> >> >> >> > - Dictionaries and sets are both accessed by key >> >> >> >> but sets have no values >> > >> > Or rather, sets *only* have values. Dictionaries have keys, sets do >> > not have keys. >> > >> But a dictionary can have duplicate values, a set cannot. > > Yes. Your “but” implies you think that contradicts my statement; it > doesn't. So I'm not sure what point you're making. > The keys of a dictionary must be unique, like a set. The values of a dictionary don't have to be unique, unlike a set.
- Previous message (by thread): intersection, union, difference, symmetric difference for dictionaries
- Next message (by thread): intersection, union, difference, symmetric difference for dictionaries
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list