I have many sets and would like to know if they have any intersection. Currently the following code is used:
if reduce(set.intersection, mysets):
...
Is there a better way to do this? I somehow heard reduce
is not good to use. But it seems to fit this scenario quite well.