Dictionary Values to be unique and get the latest key-value pair of the unique value [closed]
For example, I have a dictionary with
Input:
{"A":1, "B":1, "C":1, "D":2, "E":2, "F":3}
Output:
{"C":1, "E":2, "F":3}
I tried getting unique values and retrieving back their keys but they are not in order.
Comments
Post a Comment