test.py 216 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
import networkx as nx

G = nx.path_graph(3)
print(G.edges(data=True))

edge_data = G[0][1]
edge_data["test"] = 2
# nx.set_edge_attributes(G, 0, "test")
# edge = list(G.edges(data=True))[0]

print(G.edges(data=True))