def len_or_not(x) -> int:
    """Len of x or -1 if x has no len method"""
    if isinstance(x, str):
        # in this kata a string is NOT an ARRAY of chars.
        return -1
    try:
        return len(x)
    except TypeError:
        return -1