Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

subset in python

    smallSet = {'a', 'b'}
    superSet = {'a', 'b', 'c'}

    print(smallSet.issubset(superSet)) # This will return True
    print(superSet.issubset(smallSet)) # This will return False
 
PREVIOUS NEXT
Tagged: #subset #python
ADD COMMENT
Topic
Name
4+1 =