intersection, union, difference, symmetric difference for dictionaries
John Gordon
gordon at panix.com
Tue Feb 25 15:44:42 EST 2014
In <G57Pu.24239$Th2.4990 at tornado.fastwebnet.it> mauro <mauro at gmail.com> 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
True
>>> 5 in x
False
--
John Gordon Imagine what it must be like for a real medical doctor to
gordon at panix.com watch 'House', or a real serial killer to watch 'Dexter'.
More information about the Python-list
mailing list