networkx.Graph.order
networkx.Graph.__len__
Return the number of nodes.
Notes
This is the same as
>>> len(G) 4
and
>>> G.order() 4
Examples
>>> G=nx.path_graph(4) >>> print len(G) 4