Return a list of edges.
Parameters: | nbunch : list, iterable
data : bool
|
---|---|
Returns: | Edges that are adjacent to any node in nbunch, : or a list of all edges if nbunch is not specified. : |
Examples
>>> G=nx.path_graph(4)
>>> G.edges()
[(0, 1), (1, 2), (2, 3)]
>>> G.edges(data=True) # default edge data is 1
[(0, 1, 1), (1, 2, 1), (2, 3, 1)]