sets.make

Creates a new set.

All elements must be hashable.

Parameters

sets.copy

Creates a new set from another set.

Parameters

sets.to_list

Creates a list from the values in the set.

Parameters

sets.insert

Inserts an element into the set.

Element must be hashable. This mutates the original set.

Parameters

sets.contains

Checks for the existence of an element in a set.

Parameters

sets.is_equal

Returns whether two sets are equal.

Parameters

sets.is_subset

Returns whether a is a subset of b.

Parameters

sets.disjoint

Returns whether two sets are disjoint.

Two sets are disjoint if they have no elements in common.

Parameters

sets.intersection

Returns the intersection of two sets.

Parameters

sets.union

Returns the union of several sets.

Parameters

sets.difference

Returns the elements in a that are not in b.

Parameters

sets.length

Returns the number of elements in a set.

Parameters

sets.remove

Removes an element from the set.

Element must be hashable. This mutates the original set.

Parameters

sets.repr

Returns a string value representing the set.

Parameters

sets.str

Returns a string value representing the set.

Parameters