Frozenset Methods

frozenset.isdisjoint()

Check that there is no common member. Empty sets are disjoint from every set, including themselves. Accepts an iterable, including a generator or dictionary (whose iteration supplies keys). Returns a Boolean without mutating either built-in set operand. Hashing or iteration errors may propagate; do not depend on consuming every element of an iterator or on a specific evaluation strategy. For two sets the result is equivalent to testing whether their intersection is empty.

Formal Syntax & Structure

python syntaxpython
items.isdisjoint(other, /)

Parameters & Attributes

NameTypeDescription
otherIterable[Hashable]Iterable of candidate elements.

Return Value

bool

True when the stated relation holds, otherwise False.

Working Example

Example Snippetpython
a = frozenset({"read", "write"})print(a.isdisjoint(["export"]))print(a.isdisjoint(["read"]))
Python Reference