This method returns true if two set has no common items, else it returns false. Since, it returns a value therefore original set remains unchanged.
Variable = A.isdisjoint(B)
This method takes argument
- Set A is being taken
- Set B is being taken
- isdisjoint() method is being applied to set A with the help of set B
- Returned value is printed inside C
- Output is True. Since both sets has no common items.
- How will you find if two sets are completely distinct?
We can find if two sets are completely distinct or not by using isdisjoint() method.