title: Get degree of each nodes in a graph by Networkx in python
body: <p>Suppose I have a data set like below that shows an undirected graph:</p>
  
  <pre><code>1   2
  1   3
  1   4
  3   5
  3   6
  7   8
  8   9
  10  11
  </code></pre>
  
  <p>I have a python script like it:</p>
  
  <pre><code>for s in ActorGraph.degree():
      print(s)
  </code></pre>
  
  <p>that is a dictionary consist of key and value that keys are node names and values are degree of nodes:</p>
  
  <pre><code>('9', 1)
  ('5', 1)
  ('11', 1)
  ('8', 2)
  ('6', 1)
  ('4', 1)
  ('10', 1)
  ('7', 1)
  ('2', 1)
  ('3', 3)
  ('1', 3)
  </code></pre>
  
  <p>In <a href="https://networkx.github.io/documentation/networkx-1.10/reference/generated/networkx.DiGraph.degree.html#networkx.DiGraph.degree" rel="noreferrer">networkx</a> documentation suggest to use values() for having nodes degree. 
  now I like to have just keys that are degree of nodes and I use this part of script but it does't work and say <code>object has no attribute 'values'</code>:</p>
  
  <pre><code>for s in ActorGraph.degree():
          print(s.values())
  </code></pre>
  
  <p>how can I do it?</p>