From: http://www.asmeurer.com/python3-presentation/slides.html#55
... why is this good:
def dup(n):
for i in range(n):
yield i
yield i
... but this one better? def dup(n):
for i in range(n):
yield from [i, i]
... it would seem you're needlessly creating (1): another level of generators, and (2) creating a real list