How to test each element from a set is in other in Python?