Creates a new set.
All elements must be hashable.
PARAMETERS
Name | Description | Default Value |
---|---|---|
elements | Optional sequence to construct the set out of. | None |
Creates a new set from another set.
PARAMETERS
Name | Description | Default Value |
---|---|---|
s | A set, as returned by sets.make(). | none |
Creates a list from the values in the set.
PARAMETERS
Name | Description | Default Value |
---|---|---|
s | A set, as returned by sets.make(). | none |
Inserts an element into the set.
Element must be hashable. This mutates the original set.
PARAMETERS
Name | Description | Default Value |
---|---|---|
s | A set, as returned by sets.make(). | none |
e | The element to be inserted. | none |
Checks for the existence of an element in a set.
PARAMETERS
Name | Description | Default Value |
---|---|---|
a | A set, as returned by sets.make(). | none |
e | The element to look for. | none |
Returns whether two sets are equal.
PARAMETERS
Name | Description | Default Value |
---|---|---|
a | A set, as returned by sets.make(). | none |
b | A set, as returned by sets.make(). | none |
Returns whether a
is a subset of b
.
PARAMETERS
Name | Description | Default Value |
---|---|---|
a | A set, as returned by sets.make(). | none |
b | A set, as returned by sets.make(). | none |
Returns whether two sets are disjoint.
Two sets are disjoint if they have no elements in common.
PARAMETERS
Name | Description | Default Value |
---|---|---|
a | A set, as returned by sets.make(). | none |
b | A set, as returned by sets.make(). | none |
Returns the intersection of two sets.
PARAMETERS
Name | Description | Default Value |
---|---|---|
a | A set, as returned by sets.make(). | none |
b | A set, as returned by sets.make(). | none |
Returns the union of several sets.
PARAMETERS
Name | Description | Default Value |
---|---|---|
args | An arbitrary number of sets. | none |
Returns the elements in a
that are not in b
.
PARAMETERS
Name | Description | Default Value |
---|---|---|
a | A set, as returned by sets.make(). | none |
b | A set, as returned by sets.make(). | none |
Returns the number of elements in a set.
PARAMETERS
Name | Description | Default Value |
---|---|---|
s | A set, as returned by sets.make(). | none |
Removes an element from the set.
Element must be hashable. This mutates the original set.
PARAMETERS
Name | Description | Default Value |
---|---|---|
s | A set, as returned by sets.make(). | none |
e | The element to be removed. | none |
Returns a string value representing the set.
PARAMETERS
Name | Description | Default Value |
---|---|---|
s | A set, as returned by sets.make(). | none |
Returns a string value representing the set.
PARAMETERS
Name | Description | Default Value |
---|---|---|
s | A set, as returned by sets.make(). | none |