單項選擇題

在Python中,如何判斷一個對象是否可迭代?()

A.hasattr(obj,’__iter__’)
B.isinstance(obj,Iterable)
C.obj.isIterable()
D.A和B都對

微信掃碼免費搜題