title: Python - Select first first key-value pair from dictionary when it contains duplicate keys
body: <p>I am converting lists to dictionary...the dictionary may contain duplicate key value pairs. Python Dictionary returns key value pairs based on the last occurrence in the input data. How can i take first key-value pairs from the dictionary when a key repeats multiple times?</p>
  
  <p>i see one solution as mentioned in following link, i need to create list of values for key and then take first element from the values list.
  <a href="https://stackoverflow.com/questions/18835392/list-of-values-for-duplicate-keys-in-dictionary-python]">List of values for duplicate keys in dictionary Python</a></p>
  
  <p>Is there any other better way to do this?</p>