1 2 3 4 5 6 7
import networkx as nx G = nx.erdos_renyi_graph(100, 0.5, directed=True) print(nx.number_of_nodes(G)) print(nx.edges(G)) #for edge in