def isiterable(obj, exceptions=(str, bytes)):
    """
    >>> assert isiterable([1, 2, 3])
    >>> assert not isiterable("test")
    """
    return hasattr(obj, '__iter__') and not isinstance(obj, exceptions)
