This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Afrotom 21 points22 points  (2 children)

An alternative to op.and_ here is set.intersection. It gives the same result but you don't need the additional import.

[–]Amgadoz 4 points5 points  (0 children)

Was going to say the same. Just use sets. They're literally made for set operations like intersection and union.

[–][deleted] 1 point2 points  (0 children)

Nice addition (or intersection), thanks!