#

Note

This documents the development version of NetworkX. Documentation for the current release can be found here.

#

networkx.MultiDiGraph.__contains__

MultiDiGraph.__contains__(n)

Returns True if n is a node, False otherwise. Use: ‘n in G’.

Examples

>>> G = nx.path_graph(4)  # or DiGraph, MultiGraph, MultiDiGraph, etc
>>> 1 in G
True