Is there a method like isiterable? The only solution I have found so far is to call

hasattr(myObj, '__iter__')

But I am not sure how fool-proof this is.

2
22

Leave a Reply

Your email address will not be published. Required fields are marked *