newtorkx remove node code example
Example: newtorkx remove node
import networkx as nx
graph = nx.Graph()
graph.add_node('a')
graph.nodes
# NodeView(('a',))
graph.remove_node('a')
# NodeView(())
import networkx as nx
graph = nx.Graph()
graph.add_node('a')
graph.nodes
# NodeView(('a',))
graph.remove_node('a')
# NodeView(())