I
inkhorn
Dear all,
I'd like to know how to elegantly check a list for the membership of
any of its items to another list. Not caring for elegance, I would
use the following code:
blah = [1,2,3]
yadda = [3,4,5,6]
blah[0] or blah[1] or blah[2] in yadda
Please tell me how to change the preceding code into something nicer
where I don't have to keep extending the line based on the length of
the first list.
Cheers,
Matt Dubins
I'd like to know how to elegantly check a list for the membership of
any of its items to another list. Not caring for elegance, I would
use the following code:
blah = [1,2,3]
yadda = [3,4,5,6]
blah[0] or blah[1] or blah[2] in yadda
Please tell me how to change the preceding code into something nicer
where I don't have to keep extending the line based on the length of
the first list.
Cheers,
Matt Dubins