remove_edge¶

MultiGraph.remove_edge(u, v, key=None)[source]

Remove an edge between u and v.

Parameters: u,v: nodes Remove an edge between nodes u and v. key : hashable identifier, optional (default=None) Used to distinguish multiple edges between a pair of nodes. If None remove a single (abritrary) edge between u and v. NetworkXError If there is not an edge between u and v, or if there is no edge with the specified key.

remove_edges_from
remove a collection of edges

Examples

>>> G = nx.MultiGraph()
>>> G.remove_edge(0,1)
>>> e = (1,2)
>>> G.remove_edge(*e) # unpacks e from an edge tuple


For multiple edges

>>> G = nx.MultiGraph()   # or MultiDiGraph, etc

>>> G = nx.MultiGraph()   # or MultiDiGraph, etc