Ben,

> But the logic output is wrong.
> from sets import Set as set
> lisA=[1,2,5,9]
> lisB=[9,5,0,2]
> lisC=[9,5,0,1]
> def two(sequence1, sequence2):
>     set1, set2 = set(sequence1), set(sequence2)
>     return len(set1.intersection(set2)) == 2
> print two(lisA,lisB)
> False(should be true!)

Slow down.  The intersection of A and B is [2, 5, 9].

-- 
Richie Hindle
[EMAIL PROTECTED]

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to