Comparing Sets in Python

To compare whether all elements of one set are the same as the second, the operator == is used. If the sets are equal to each other, the Boolean value True is returned, otherwise - False.

Let's compare two sets:

pythonst1 = {1, 2, 3, 4}
st2 = {2, 1, 3, 4}

print(st1 == st2) # True

Now let's compare the following sets:

pythonst1 = {8, 6, 4, 2}
st2 = {5, 8, 2, 4}

print(st1 == st2) # False
Задание 1

The following code is given:

pythonst1 = {'a', 'f', 'e', 'b'}
st2 = {'f', 'a', 'b', 'e'}

print(st1 == st2)

Tell me what will be output to the console.

Задание 2

The following code is given:

pythonst1 = {'1', '4', '2', '3'}
st2 = {'2', '3', '4', 1}

print(st1 == st2)

Tell me what will be output to the console.