I've started a python crash course and this is an excerpt of it, pertaining to dictionaries
myDict = {'One':1.35, 2.5:'Two Point Five', 3:'+', 7.9:2}
# print the entire dictionary
print(myDict)
You’ll get {2.5: 'Two Point Five', 3: '+', 'One': 1.35, 7.9: 2}
Note that items in a dictionary are not stored in the same order as the way you declare them.
I've replicated that, and in my case the items are printed as I declared them. Why am I getting a different result? My output:
myDict = {'One':1.35, 2.5:'Two Point Five', 3:'+', 7.9:2}
#print the entire dictionary
print(myDict)
Output: {'One': 1.35, 2.5: 'Two Point Five', 3: '+', 7.9: 2}