Skip to content

Python Set Types Set

Quincy Larson edited this page Aug 20, 2016 · 1 revision

Python Set

TODO: set basic info

Mutable

Creation:

set literal:

Curly brackets, {}, can't be used to create an empty set:

>>> not_set = {}     # set constructor must be used to make empty sets.
>>> type(not_set)    # Empty curly brackets create empty dictionaries.
<class 'dict'>

set constructor:

Previous

Clone this wiki locally