def v5_tail(iterable, n):
    """Return the last n items of given iterable.

    Instead of storing every item in the given iterable into a new sequence,
    we could store just the last n items we've seen.

    Here we're using a * to unpacking the last (n-1) items into a new list
    with our current item at the end and then reassigning that to items.
    This use of * expressions only works in Python 3.5+.

    Note that this doesn't work when n is 1. When n is 1, (n-1) will be 0 which
    means our items list will grow continually instead of only keeping the
    last 1 item.
    """
    items = []
    if n <= 0:
        return []
    for item in iterable:
        items = [*items[-(n-1):], item]
    return items