intersection and union idea

Neil Macneale mac4-devnull at theory.org
Mon Jul 23 19:57:20 EDT 2001


I was day dreaming about python today, and I realized that it would be
very python-ish to have intersection and union operators for lists and
tuples. Eg:

>>> (1,2,3,4) | (1,3,6,8)
(1,2,3,4,6,8)
>>> (1,2,3,4) & (1,3,6,8)
(1,3)

Does such an operator exist? I am sure someone else has thought of this
before.

Neil Macneale

--
To reply to me via email, remove the '-devnull' from my address.



More information about the Python-list mailing list