networkx.number_connected_components
networkx.connected_component_subgraphs
Enter search terms or a module, class or function name.
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.