how to check if all elements in 2 lists are disjoint code example Example: python check if two sets intersect a = [1, 2, 3] b = [3, 4, 5] bool(set(a) & set(b))