Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

compare 2 sets python

    first_set = [10, 20, 30]
    second_set = [10, 20, 30]
    if len(first_set) == len(second_set):
        if first_set == second_set:
            print("Both sets are equal")
        else:
            print("Both sets are not equal")
    else:
        print("Both sets are not equal")
Source by betterprogramming.pub #
 
PREVIOUS NEXT
Tagged: #compare #sets #python
ADD COMMENT
Topic
Name
6+8 =