title: Accessing networkx nodes and attributes
body: <p>I have this GraphML file that I've read into Networkx.</p>
  
  <p>So I access all the nodes by:</p>
  
  <pre><code>g.nodes()
  </code></pre>
  
  <p>It gives me a list of strings. Say one of them is "123".
  I then try to access a node as:</p>
  
  <pre><code>g["123"]
  </code></pre>
  
  <p>and it gives me a dictionary.</p>
  
  <p>I then try to access the nodes using the nodes function as follows:</p>
  
  <pre><code>for n in g.nodes( data = True ):
      print n
  </code></pre>
  
  <p>It then gives me a 2-tuple with the string node name as first element and a dictionary as a second element.</p>
  
  <p>The thing is, it is a different dictionary from the first one. And it's confusing the heck out of me, so any help here is appreciated.</p>
  
  <p>Are they supposed to be different? If so, why? If not, then what am I doing wrong? :)
  I can post the actual data if it would help.</p>