Remove all edges specified in ebunch.
Parameters : | ebunch: list or container of edge tuples :
|
---|
See also
Notes
Will fail silently if an edge in ebunch is not in the graph.
Examples
>>> G = nx.MultiGraph() # or MultiDiGraph
>>> G.add_path([0,1,2,3])
>>> ebunch=[(1,2),(2,3)]
>>> G.remove_edges_from(ebunch)
Removing multiple copies of edges
>>> G = nx.MultiGraph()
>>> G.add_edges_from([(1,2),(1,2),(1,2)])
>>> G.remove_edges_from([(1,2),(1,2)])
>>> G.edges()
[(1, 2)]
>>> G.remove_edges_from([(1,2),(1,2)]) # silently ignore extra copy
>>> G.edges() # now empty graph
[]