NetworkX

Previous topic

networkx.Graph.has_node

Next topic

networkx.Graph.has_edge

Quick search

networkx.Graph.__contains__

Graph.__contains__(n)

Return True if n is a node, False otherwise. Use “n in G”.

Examples

>>> G=nx.path_graph(4)
>>> print 1 in G
True