方法一:
适用于python2和python3
>>> from collections import Iterable
>>> isinstance("str", Iterable)
True
方法二:
适用于python3
s = "hello world"
hasattr(s, "__iter__")
发布时间:2019-10-16 17:29:49编辑:auto阅读(2811)
适用于python2和python3
>>> from collections import Iterable
>>> isinstance("str", Iterable)
True
适用于python3
s = "hello world"
hasattr(s, "__iter__")
上一篇: 基于python3.5+的web框架s
下一篇: VIM自动补全插件:deoplete
48541
47482
38313
35553
30009
26719
25685
20628
20350
18758
80°
139°
158°
151°
162°
201°
229°
336°
330°
300°