Python Program to Delete a set

In the following example of Python program to delete a set :
Program :
# create a set
my_set = {1, 2, 3, 4, 5}

# delete the set
del my_set

# check if the set exists
try:
    print(my_set)
except NameError:
    print("The set does not exist.")
Output :
The set does not exist.
This program creates a set called `my_set` and then deletes it using the `del` keyword. Finally, it checks if the set exists by attempting to print it, and catches the resulting `NameError` to confirm that the set has been deleted.