s = set() if len(s) == 0: print('Empty') else: print('Not empty')
Here is what the above code is Doing:
1. We create a set called s.
2. We add a few elements to the set.
3. We check if the set is empty.
4. If the set is empty, we print a message.
5. If the set is not empty, we print a different message.
The output of the code will be: