# grinpy.functions.degree.degree_sequence¶

grinpy.functions.degree.degree_sequence(G)

Return the degree sequence of G.

The degree sequence of a graph is the sequence of degrees of the nodes in the graph.

Parameters: G (NetworkX graph) – An undirected graph. The degree sequence of the graph. list

Examples

>>> G = nx.path_graph(3) # Path on 3 nodes
>>> nx.degree_sequence(G)
[1, 2, 1]