好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

判断变量是否可迭代

>>> from collections import Iterable
>>> isinstance("str", Iterable)
True 
s = "hello world"
hasattr(s, "__iter__") 

更多[python][基础]判断变量是否可迭代相关文章请关注PHP中文网!

查看更多关于判断变量是否可迭代的详细内容...

  阅读:44次