方法一:
适用于python2和python3
>>> from collections import Iterable
>>> isinstance("str", Iterable)
True
方法二:
适用于python3
s = "hello world"
hasattr(s, "__iter__")
发布时间:2019-10-16 17:29:49编辑:auto阅读(2376)
适用于python2和python3
>>> from collections import Iterable
>>> isinstance("str", Iterable)
True
适用于python3
s = "hello world"
hasattr(s, "__iter__")
上一篇: 基于python3.5+的web框架s
下一篇: VIM自动补全插件:deoplete
46499
44387
35836
33396
28091
24659
23579
18795
18060
16744
4563°
5123°
4651°
4791°
5454°
4420°
4471°
5018°
4909°
6155°