networkx.Graph.add_cycle
networkx.Graph.nodes
Remove all nodes and edges.
This also removes the name.
Examples
>>> G=nx.path_graph(4) >>> G.clear() >>> G.nodes() [] >>> G.edges() []