📜  networkx 探索节点 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:23.904000             🧑  作者: Mango

代码示例1
>>> G = nx.Graph()   # or DiGraph, MultiGraph, MultiDiGraph, etc
>>> G.add_path([0,1,2])
>>> G.nodes()
[0, 1, 2]
>>> G.add_node(1, time='5pm')
>>> G.nodes(data=True)
[(0, {}), (1, {'time': '5pm'}), (2, {})]