NetworkX

Previous topic

networkx.number_connected_components

Next topic

networkx.connected_component_subgraphs

networkx.connected_components

connected_components(G)

Return a list of lists of nodes in each connected component of G.

The list is ordered from largest connected component to smallest. For undirected graphs only.