Python create empty set

In this post, we will see how to create an set in python.

Set is collection which contains unique elements.You can simply use set() function to create empty set in Python.

Let’s see this with the help of example.

Output:

empty set s: set()
set s: {1, 2, 3}

That’s all about Python create empty set.

Was this post helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *