Python Set Types Set - thelastmile/FreeCodeCamp GitHub Wiki

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

⚠️ **GitHub.com Fallback** ⚠️