blovekyo 发表于 2018-8-13 07:12:10

python遍历的三种方式

>>> a = "a b c d e"  'a b c d e'
  >>> a_list = a.split()
  >>> a_list
  ['a', 'b', 'c', 'd', 'e']
  >>> for i in a_list:
  ...   print i
  ...
  a
  b
  c
  d
  e
  >>>
页: [1]
查看完整版本: python遍历的三种方式