title: What does `d for n` mean in sorted(d for n, d in G.degree())?
body: <p>I am learning the <code>networkx</code> library and I came across this (source code is <a href="https://networkx.org/documentation/stable/tutorial.html#analyzing-graphs" rel="nofollow noreferrer">here</a>)</p>
  <pre><code>sorted(d for n, d in G.degree())
  </code></pre>
  <p>which sorts the degrees of nodes in graph <code>G</code>. I don't quite understand this, especially <code>d for n</code>: what does <code>n</code> mean here?</p>