def is_seq(obj):
    """
    Returns true if `obj` is a non-string sequence.
    """
    try:
        len(obj)
    except (TypeError, ValueError):
        return False
    else:
        return not isinstance(obj, str)