If you have a dict literal (within {}) and a key occurs multiple times, the last one "overwrites" the previous ones. It's just the decision that was taken in the first versions of Python.
Print the whole dict to see:
>>> dic={"a":1,"b":2,"a":3,"a":2,"a":4,"a":5}
>>> dic
{'a': 5, 'b': 2}
See the docs, emphasis mine:
If a comma-separated sequence of key/datum pairs is given, they are
evaluated from left to right to define the entries of the dictionary:
each key object is used as a key into the dictionary to store the
corresponding datum. This means that you can specify the same key
multiple times in the key/datum list, and the final dictionary’s value
for that key will be the last one given.