intersection

Penfold spam at spam.com
Fri May 26 00:39:45 CEST 2000


Your could try using the ever useful kjbuckets module (find it on
www.vex.net/parnassus).

This implements mathematical sets and graphs which mean your below becomes
as easy as
kjSet([1,2,3,4,5]) & kjSet([4,5,6,7,8])

Des

Thomas Thiele <thiele at muc.das-werk.de> wrote in message
news:392D4BDC.6F339367 at muc.das-werk.de...
> Hallo!
>
> Is there a function returning the intersectin of two lists.
>
> Example:
>
> l1 = [1,2,3,4,5]
> l2 = [4,5,6,7,8]
>
> l3 should be [4,5]
>
> It' s not diffucult to program it, but I couldn't find a
> build-in-fucnction. Or I'm blind?





More information about the Python-list mailing list