NetworkX

Previous topic

networkx.LabeledGraph.number_of_nodes

Next topic

networkx.LabeledGraph.size

Quick search

networkx.LabeledGraph.__len__

LabeledGraph.__len__()

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

Examples

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