title: How do I get the giant component of a NetworkX graph?
body: <p>I don't know if NetworkX recently tweaked one of the methods to be a generator instead of returning a list, but I'm looking for a good (rather, better) way to get the GC of a graph.</p>
  
  <p>I have a working, but really inefficient-looking, snippet down:</p>
  
  <pre><code># G = nx.Graph()
  giant = sorted(nx.connected_component_subgraphs(G), key=len, reverse=True)[0]
  </code></pre>
  
  <p>Is there a cleaner way?</p>