descendants

descendants(G, source)[source]

Return all nodes reachable from source in G.

Parameters:
  • G (NetworkX DiGraph) –
  • source (node in G) –
Returns:

des – The descendants of source in G

Return type:

set()