def temp():
    for i in range(5):
        yield 2*i

g = temp()

l = list(g)

print(l)