Python set isdisjoint() Method Syntax

Syntax: set1.isdisjoint(set2)

Parameters:

  • another set to compare with
    or
  • an iterable (list, tuple, dictionary, and string)

Return: bool

Python Set isdisjoint() Method

Python set isdisjoint() function check whether the two sets are disjoint or not, if it is disjoint then it returns True otherwise it will return False. Two sets are said to be disjoint when their intersection is null. 

Similar Reads

Python set isdisjoint() Method Syntax:

Syntax: set1.isdisjoint(set2) Parameters: another set to compare withor an iterable (list, tuple, dictionary, and string) Return: bool...

Python Set isdisjoint() Method Example:

Python3 s1 = {1, 2, 3} s2 = {4, 5, 6} print(s1.isdisjoint(s2))...