title: Named dictionary in python
body: <p>I did some research on how to use named array from PHP in python, while i found the following code example as they said can be done with dictionary. </p>
  
  <pre><code>shows = [
     {"id": 1, "name": "Sesaeme Street"},
     {"id": 2, "name": "Dora The Explorer"},
  ]
  </code></pre>
  
  <p>Source: <a href="https://stackoverflow.com/questions/178199/python-can-i-have-a-list-with-named-indices">Portion of code getting from here</a></p>
  
  <p>Reference: <a href="http://docs.python.org/2/tutorial/datastructures.html#dictionaries" rel="nofollow noreferrer">Python references</a></p>
  
  <p>But how could i adding a new value through a loop? While the references shown on how to adding single value by simply shows['key']="value" but i can't linking both of them. Can anyone please show me how to add the value into this dictionary through a loop?</p>
  
  <p>For example: </p>
  
  <pre><code>for message in messages: 
              myvariable inside having two field
              - Message
              - Phone number
  </code></pre>
  
  <p><strong>Update</strong>
  May i know how could i loop them out to display after aped list into dictionary? Thanks!</p>