As with nodes, there are multiple ways to add the arcs. In [5]:. G1.add_edge(1, 2, weight = 2.0) G1.add_edge(1,3) G1.edge[1][3]['weight'] = 4.0 ...
確定! 回上一頁