Python set() Method Syntax
Syntax: set(iterable)
Parameters : Any iterable sequence like list, tuple or dictionary.
Returns : An empty set if no element is passed. Non-repeating element iterable modified as passed as argument.
Python | set() Function
set() method is used to convert any of the iterable to a sequence of iterable elements with distinct elements, commonly called Set. In Python, the set() function is a built-in constructor that is used to initialize a set or create an empty. In this article, we will see about set() in Python and how we can convert an iterable to a sequence with unique elements in Python.
Contact Us