NetworkX

Previous topic

networkx.LabeledDiGraph.nodes_iter

Next topic

networkx.LabeledDiGraph.edges

Quick search

networkx.LabeledDiGraph.__iter__

LabeledDiGraph.__iter__()

Iterate over the nodes. Use “for n in G”.

Examples

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