DiGraph.__contains__#
- DiGraph.__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
NetworkX User Survey 2023 🎉 Fill out the survey to tell us about your ideas, complaints, praises of NetworkX!