def shorten(s, length):
    """
    Shorten `s` to `length` by appending it with "...". If `s` is small,
    return the same string

    >>> shorten("very long string", 9)
    "very l..."
    >>> shorten("small", 10)
    "small"
    """

    if len(s) > length:
        return s[:length - 3] + '...'
    else:
        return s