2. whats the score


I am using idle in python shell 3.5.2 and I have set up the list as show in my code below. when I add the quiz numbers through lloyd["homework"] formula and then print lloyd, lloyd loses the key order as I initially wrote it. nam-homework-quizzes-tests becomes homework-quizzes-tests-name.
does any one have an explanation?


>>> print (lloyd)
{'homework': [90, 97, 75, 92], 'quizzes': [], 'tests': [], 'name': 'Lloyd'}


dictionary's are unordered

if you want order, use lists


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.