有方法isiterable吗?到目前为止我找到的唯一解决方案是打电话
isiterable
hasattr(myObj, '__iter__')
但我不确定这是多么万无一失.
python iterable
iterable ×1
python ×1