Note

This documents the development version of NetworkX. Documentation for the current release can be found here.

networkx.convert.to_edgelist

to_edgelist(G, nodelist=None)[source]

Returns a list of edges in the graph.

Parameters
Ggraph

A NetworkX graph

nodelistlist

Use only nodes specified in nodelist