Re: finding the intersection of a list of Sets
- From: "Raymond Hettinger" <python@xxxxxxx>
- Date: 31 Jan 2006 09:34:34 -0800
That should have been:
>>> sets.sort(key=len)
>>> reduce(set.intersection, sets)
The only refinement was the pre-sort based on set length.
.
- References:
- finding the intersection of a list of Sets
- From: Suresh Jeevanandam
- Re: finding the intersection of a list of Sets
- From: Raymond Hettinger
- finding the intersection of a list of Sets
- Prev by Date: Re: StringIO proposal: add __iadd__
- Next by Date: Re: Python vs C for a mail server
- Previous by thread: Re: finding the intersection of a list of Sets
- Next by thread: test whether 2 objects are equal
- Index(es):