NetworkX

Previous topic

networkx.LabeledDiGraph.number_of_nodes

Next topic

networkx.LabeledDiGraph.size

Quick search

networkx.LabeledDiGraph.__len__

LabeledDiGraph.__len__()

Return the number of nodes. Use “len(G)”.

Examples

>>> G=nx.path_graph(4)
>>> print len(G)
4