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

14 行
340B

  1. from __future__ import absolute_import
  2. from __future__ import print_function
  3. from abp import NXGraphState
  4. from abp.util import xyz
  5. import networkx as nx
  6. from six.moves import range
  7. n = 10
  8. g = NXGraphState(list(range(n)))
  9. nx.set_node_attributes(g, "color", "red")
  10. g.add_edges_from([i, i+1] for i in range(n-1))
  11. print((g.node[0]["color"]))