title: adjacency list construction
body: <p>I'm having problems understanding the final output of </p>
  
  <pre><code>for i in edgeList:
      adjacencyList[i[0]].append(i[0])
  </code></pre>
  
  <p>in the code below. I've tried printing out statements in every line to try and understand but am still confused. </p>
  
  <pre><code>    vertexList = ["0","1","2","3","4","5","6"]
      edgeList = [(0,1), (0,2),(1,0), (1,3), (2,0), (2,4), (2,5), (3,1), (4,2), (4,6), (5,2), (6,4)]
  
      adjacencyList = [[] for vertex in vertexList]
  
      for i in edgeList:
          adjacencyList[i[0]].append(i[1])
  
      print(adjacencyList)
  
  Output: [[1, 2], [0, 3], [0, 4, 5], [1], [2, 6], [2], [4]]
  </code></pre>
  
  <p>Is this considered a for loop occuring within a for loop because of the list comprehension? Appreciate if someone could spell out what is happening here. (this is related to BFS in graph theory)</p>