can you use a list comprehension here instead?

    results = [next(intervals) for i in range(10)]