First page Back Continue Last page Overview Graphics

Another Example

def abc():

while True:

yield "a"

yield "b"

yield "c"

yield "d"

yield "e"

def firstn(g, n):

for i in range(n):

yield next(g)