[next(generator) for _ in range(n)]
(x for _, x in zip(list(range(n)), generator))

def top_n(n, generator):
    for _ in range(n):
        yield next(generator)
How to take the first N items from a generator or list in Python?