import networkx as nx
G = nx.read_edgelist('webpages.txt', create_using=nx.DiGraph())
print(nx.info(G))
AttributeError: module 'networkx' has no attribute 'info'
print(nx.info(G)) without the error
import networkx as nx
G = nx.read_edgelist('webpages.txt', create_using=nx.DiGraph())
print(nx.info(G))
AttributeError: module 'networkx' has no attribute 'info'
print(nx.info(G)) without the error
info
method has been removed from networkx 3
You should consider accessing the Graph properties directly instead
print('Number of nodes', len(G.nodes))
print('Number of edges', len(G.edges))
print('Average degree', sum(dict(G.degree).values()) / len(G.nodes))