Adding a key
Title
Question
At 4:29 min when u r adding key as height it is getting added alphabetically , but at 6:03min you say
keys of dictionary are not ordered. It's confusing.
why student['height']=6.2 not getting added at last in student dict?
Python-3.4.3 Dictionaries 04-05 min 20-30 sec
Answers:
In theory, Dictionaries do not guarantee order, which means you may be able to see that the keys are in order, but when you iterate over them or use them in a program, you should not rely on the order, that is bad design.
Login to add comment