import string


def iterable(obj):
    """
    Return True if C{obj} is a collection or iterator, but not string.
    This is guaranteed to work in both python 2 and 3.
    
    @rtype: bool
    """
    if hasattr(obj, '__iter__'):
        if not isinstance(obj, string):
            return True
        
    return False