Answers for "how to check if all elements in 2 lists are disjoint"

1

python check if two sets intersect

a = [1, 2, 3]
b = [3, 4, 5]

bool(set(a) & set(b))
Posted by: Guest on October-06-2020

Code answers related to "how to check if all elements in 2 lists are disjoint"

Python Answers by Framework

Browse Popular Code Answers by Language