I wanted to understand logic behind set().
Program :
A={500,520,600,345,520,634,600,500,200,200}
print ("Set A = ",A)
B={10,20,60,345,50,600,500,200,200}
print ("Set B = ",B)
print ("Set A | Set B = ", A|B)
Output :
Set A = {520, 200, 500, 600, 345, 634}
Set B = {200, 10, 50, 20, 500, 600, 345, 60}
Set A | Set B = {520, 200, 10, 50, 500, 20, 600, 345, 634, 60}
How set decide in which sequence output should be displayed.