def shingles(tokens, n):
    """
        Return n-sized shingles from a list of tokens.
        >>> assert list(shingles([1, 2, 3, 4], 2)) == [(1, 2), (2, 3), (3, 4)]
    """
    return zip(*[tokens[i:-n + i + 1 or None] for i in range(n)])