A set in Python is a sequential grouping of non-duplicate elements. A set cannot have any duplicate elements.
Each element stored in a set must be unique.
We can create a set by calling the built-in set()
function.
The set( )
function takes a List as input and returns a Set containing unique values. Any repeating/duplicate values in the List are removed.
We can also create a set by enclosing our values within the {}.