Python: test if object is iterable

Author: Wojciech Muła
Added on:2011-02-26
def isiterable(obj)
        try:
                iter(obj)
                return True
        except TypeError:
                return False