def is_sequence(arg):
    """
    Return True if arg is a sequence (list, tuple, ...) but not a str
    """
    if isinstance(arg, str): return False
    if hasattr(arg, 'strip'): return False
    return hasattr(arg, '__getitem__') or hasattr(arg, '__iter__')