Why code is showing output like this? Info in the code | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Why code is showing output like this? Info in the code

https://code.sololearn.com/cBgJslz8TjQk/?ref=app

9th Oct 2017, 2:06 AM
Adhyayan
Adhyayan - avatar
2 ответов
+ 1
As opposed to lists, dictionaries make no guarantees whatsoever regarding the order of its elements. If you care about order, you use lists. The fact that they are reordered is simply because Python is using an underlying structure behind the scenes which reorganizes its elements to optimize various operations on the dictionary.
10th Oct 2017, 5:45 AM
Chinmoy
Chinmoy - avatar
+ 1
Thanks Chinmoy
10th Oct 2017, 6:21 AM
Adhyayan
Adhyayan - avatar