intersection, union, difference, symmetric difference for dictionaries

John Gordon gordon at
Tue Feb 25 21:44:42 CET 2014

In <G57Pu.24239$Th2.4990 at> mauro <mauro at> writes:

> - Dictionaries and sets are both accessed by key

As far as I have used sets, they are not accessed by key.

>>> x = set([1, 2, 'buckle my shoe'])
>>> x
set([1, 2, 'buckle my shoe'])
>>> 1 in x
>>> 5 in x

John Gordon         Imagine what it must be like for a real medical doctor to
gordon at    watch 'House', or a real serial killer to watch 'Dexter'.

More information about the Python-list mailing list