degree of node networkx code example Example: get node degree networkx G.degree[0] # return node 0 degree