title: Python - function to create a dictionary from a list
body: <p>I'm defining a function in Python that takes a list as an argument. The function should return a dictionary from that list.</p>
  
  <pre><code>persons = [['john','doe'],['tony','stark']]
  
  def build_agenda(person_list):
      """Return a dictionary about a list of information of people"""
      persons = {}
      for person in person_list:
          persons['first_name'] = person[0]
          persons['last_name'] = person[1]
      return persons
  
  output = build_agenda(persons)
  print(output)
  </code></pre>
  
  <p>The problem is that only one value it's being returned as a dictionary, isn't the code supposed to create a new entry for each person that it's found on the list?</p>
  
  <p><a href="https://i.stack.imgur.com/dyVPL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dyVPL.png" alt="enter image description here"></a></p>