On 2014-02-25 23:14, Ben Finney wrote:
MRAB <pyt...@mrabarnett.plus.com> writes:
On 2014-02-25 21:27, Ben Finney wrote:
> Peter Otten <__pete...@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.
--
https://mail.python.org/mailman/listinfo/python-list