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