Anders and Briegel in Python
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

10 行
227B

  1. from abp.fancy import GraphState
  2. from abp.util import xyz
  3. import networkx as nx
  4. n = 10
  5. g = GraphState(range(n))
  6. nx.set_node_attributes(g, "color", "red")
  7. g.add_edges_from([i, i+1] for i in range(n-1))
  8. print g.node[0]["color"]