Function Details: isdisjoint

Description


Return True if two sets have a null intersection.


Extended Description


The isdisjoint() method returns True if the set has no elements in common with the specified iterable. It returns False otherwise. Two sets are considered disjoint if their intersection is the empty set. This method is more efficient than computing the intersection first and then testing for emptiness.


Function Signature


set.isdisjoint(other: Iterable) -> bool

Module: set

Class: set

Parameters



Parameter List


  • other: Iterable

Return


Returns a boolean value: True if the sets are disjoint, False otherwise.


Return Type


bool

Output

Explanation

This example shows isdisjoint() with disjoint and non-disjoint sets.