Python: See if one set contains another entirely?

Posted by Rosarch on Stack Overflow See other posts from Stack Overflow or by Rosarch
Published on 2010-05-04T13:55:39Z Indexed on 2010/05/04 13:58 UTC
Read the original article Hit count: 105

Filed under:
|

Is there a fast way to check if one set entirely contains another?

Something like:

>>>[1, 2, 3].containsAll([2, 1])
True

>>>[1, 2, 3].containsAll([3, 5, 9])
False

© Stack Overflow or respective owner

Related posts about python

Related posts about set