>>> from collections import Iterable >>> isinstance("str", Iterable) True
s = "hello world" hasattr(s, "__iter__")
更多[python][基础]判断变量是否可迭代相关文章请关注PHP中文网!
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did86108
>>> from collections import Iterable >>> isinstance("str", Iterable) True
s = "hello world" hasattr(s, "__iter__")
更多[python][基础]判断变量是否可迭代相关文章请关注PHP中文网!