Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check if a set is a subset of another set python

A = {1, 2, 3}
B = {1, 2, 3, 4, 5}

# all items of A are present in B
print(A.issubset(B))

# Output: True
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #check #set #subset #set #python
ADD COMMENT
Topic
Name
7+8 =