NetworkX

Previous topic

networkx.MultiDiGraph.successors

Next topic

networkx.MultiDiGraph.predecessors

Quick search

networkx.MultiDiGraph.successors_iter

MultiDiGraph.successors_iter(n)

Return an iterator over all neighbors of node n.

Notes

It is faster to iterate over the using the idiom >>> print [n for n in G[0]] [1]

Examples

>>> G=nx.path_graph(4)
>>> print [n for n in G.neighbors(0)]
[1]