79377308

Date: 2025-01-22 10:19:21
Score: 2
Natty:
Report link

As @Adirio said in a comment, you can simply use the built-in function isdisjoint (available from version 2.6):

def myfunc(a,b):
    return not a.isdisjoint(b)

I'm assuming you want to return False when the intersection between a and b is empty, otherwise just remove the not.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Adirio
  • Low reputation (1):
Posted by: TomeMD