title: Find end nodes (leaf nodes) in radial (tree) networkx graph
body: <p>Given the following graph, is there a convenient way to get only the end nodes?</p>
  
  <p>By end nodes I mean those to-nodes with one connecting edge. I think these are sometimes referred to as leaf nodes.</p>
  
  <pre><code>G=nx.DiGraph()
  fromnodes=[0,1,1,1,1,1,2,3,4,5,5,5,7,8,9,10]
  tonodes=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
  for x,y in zip(fromnodes,tonodes):
      G.add_edge(x,y)
  G.add_node(17)     # isolated node
  nx.draw_shell(G)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/yVjnq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yVjnq.png" alt="enter image description here"></a></p>
  
  <p>In this example, it would be <code>[6,11,12,13,14,15,16]</code></p>