NetworkX

Previous topic

networkx.LabeledDiGraph.nbunch_iter

Next topic

networkx.LabeledDiGraph.__contains__

Quick search

networkx.LabeledDiGraph.has_node

LabeledDiGraph.has_node(n)

Return True if graph has node n.

Notes

It is more readable and simpler to use >>> 0 in G True

Examples

>>> G=nx.path_graph(4)
>>> print G.has_node(0)
True