Check two set are equal || Sets || Python
In this we are going to see a basic program which checks whether two sets are equal in Python Programming Language.


set1 = {"Mango", "Apple", "Grapes", "Cherry", "Pineapple", "Banana"}
set2 = {"Mango", "Apple", "Grapes", "Cherry", "Pineapple", "Banana"}
print("Set1 : ", set1)
print("Set2 : ", set2)

# For Checking Whether Two Sets Are Equal
if set1 == set2:
    print("Two Sets Are Equal")
else:
    print("Two Sets Are Not Equal")

# Coded By DHIRAJ SHELKE


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post