Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

# networkx.DiGraph.successors¶

DiGraph.successors(n)[source]

Returns an iterator over successor nodes of n.

A successor of n is a node m such that there exists a directed edge from n to m.

Parameters: n (node) – A node in the graph NetworkXError – If n is not in the graph.

Notes

neighbors() and successors() are the same.