Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

to_edgelist

to_edgelist(G, nodelist=None)[source]

Return a list of edges in the graph.

Parameters :

G : graph

A NetworkX graph

nodelist : list

Use only nodes specified in nodelist