Overview:
- The method disjoint() determines whether two sets does not have any element in common.
- The disjoint() method checks the disjoint property between two sets.
- In set theory, two sets are said to be disjoint if they do not have any element in common. When the intersection between two sets is an empty set, they are disjoint to each other. If A ∩ B = Ø then the sets A and B are called disjoint.
Example:
# Example Python program that creates two sets
|
Output:
Woodwinds and guitars have no instruments common to both:True |