+ 2

Lists[ ] and Dictionaries { }

Why 'Lists' are ordered and 'Dictionaries' are un-ordered?

14th Jul 2020, 3:57 PM
Gaurav Joshi
Gaurav Joshi - avatar
2 Réponses
+ 6
because dictionaries are accessed through their keys, wich cant be the same as one another. index in lists are numbers starting at zero and they can be ordered
14th Jul 2020, 4:01 PM
Slick
Slick - avatar
+ 2
Gaurav Joshi , please give us samples, what you mean by "ordered" and explain it a bit. Please also tell us what you want to achieve. Thanks!
14th Jul 2020, 6:11 PM
Lothar
Lothar - avatar