Why the output {8, 9, 7} not {7, 8, 9} ? | Sololearn: Learn to code for FREE!
Nowy kurs! Każdy programista powinien nauczyć się Generative AI!
Wypróbuj darmową lekcję
0

Why the output {8, 9, 7} not {7, 8, 9} ?

In line 7 https://code.sololearn.com/c8215BTOn2AJ/?ref=app

13th Jul 2017, 10:23 PM
Revian Budiman
Revian Budiman - avatar
2 odpowiedzi
+ 11
Sets, like dictionaries, are *unordered* collections with unique elements. When printed, the order is random and irrelevant.
13th Jul 2017, 10:32 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
oh get it, good explanation, thank you for your answer :D
13th Jul 2017, 10:34 PM
Revian Budiman
Revian Budiman - avatar