Is there a fast way to check if one set entirely contains another?
Something like:
>>>[1, 2, 3].containsAll([2, 1]) True >>>[1, 2,
If you suspect a set to be a subset of another, and intersect those two sets together, the result is equal to itself if it is a subset.
a = [2,1,3,3] b = [5,4,3,2,1] set(a).intersection(set(b)) == set(a) >>True