is_iterable function.

Neil Cerutti horpner at yahoo.com
Wed Jul 25 14:24:24 EDT 2007


def is_iterable(obj):
    try:
        iter(obj)
        return True
    except TypeError:
        return False

Is there a better way?

-- 
Neil Cerutti



More information about the Python-list mailing list