NetworkX

Previous topic

networkx.MultiGraph.add_cycle

Next topic

networkx.MultiGraph.nodes

Quick search

networkx.MultiGraph.clear

MultiGraph.clear()

Remove all nodes and edges.

This also removes the name.

Examples

>>> G=nx.path_graph(4)
>>> G.clear()
>>> G.nodes()
[]
>>> G.edges()
[]