Example dictionary:
dictionary = {}
dictionary['a'] = 1
dictionary['b'] = 2
dictionary['c'] = 3
dictionary['d'] = 4
dictionary['e'] = 5
print(dictionary)
run this code 1st time:
{'c': 3, 'd': 4, 'e': 5, 'a': 1, 'b': 2}
2nd:
{'e': 5, 'a': 1, 'b': 2, 'd': 4, 'c': 3}
3rd:
{'d': 4, 'a': 1, 'b': 2, 'e': 5, 'c': 3}
My expected result:
{'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5}
or if my code is:
dictionary = {}
dictionary['r'] = 150
dictionary['j'] = 240
dictionary['k'] = 98
dictionary['l'] = 42
dictionary['m'] = 57
print(dictionary)
#The result should be
{'r': 150, 'j': 240, 'k': 98, 'l': 42, 'm': 57}
Because of my project the dictionary with 100++ lists will write to a file and it will easier to read.
P.S. sorry for my english and if my question title is not clear.
Thank you.