Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Comparing Sets with isdisjoint() Function in python

# The isdisjoint() function can be used to determine whether or not two sets have
# an intersection or not

mySet = {1, 2, 3}
mySet2 = {4, 5, 6}
print(mySet.isdisjoint(mySet2))

# Output: 
# True
Source by liu-111.medium.com #
 
PREVIOUS NEXT
Tagged: #Comparing #Sets #Function #python
ADD COMMENT
Topic
Name
1+6 =