'Sets in python (using iterator)

When we usually enter scrambled numbers in a set later on if we print the set it automatically sorts the numbers and default it prints the set in ascending order..but today I got confused with this example..could anyone help me with this..output

Program where i used iterator for sets



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source