+ 1
Why is 25 printed first instead of apple?
S = {"apple",25,"orange"} for X in S: print(X) The Output is 25 apple orange why is the integer 25 is being printed first instead of the string apple in the list
1 Odpowiedź
+ 12
Because S is not a list, it is a set. The sets are unordered (positions of the elements are not guaranteed).