title: iteration over a Dictionary
body: <p>In below code users and friendships are  dictionaries and two element touple.  The 2nd for loop </p>
  
  <pre><code>for i,j in friendships:
      users[i]["friends"].append(users[j])
      users[j]["friends"].append(users[i])
  </code></pre>
  
  <p>add additional "friends" key to the original users dictionary. How exactly the 
  second for loop is executing to add the values for friends key?   </p>
  
  <pre><code>users=[
              {"id":0,"name":"Hero"},
              {"id":1,"name":"Dunn"},
              {"id":2,"name":"Sue"},
              {"id":3,"name":"Chi"},
              {"id":4,"name":"Thor"},
              {"id":5,"name":"Clive"},
              {"id":6,"name":"Hicks"},
              {"id":7,"name":"Devin"},
              {"id":8,"name":"Kate"},
              {"id":9,"name":"klein"}
      ]
  friendships=[(0,1),(0,2),(1,2),(1,3),(2,3),(3,4),(4,5),(5,6),(5,7),(6,8),(7,8),(8,9)]
  
  for user in users:
      user["friends"]=[]
  for i,j in friendships:
      users[i]["friends"].append(users[j])
      users[j]["friends"].append(users[i])
  </code></pre>