def make_adder(n): def fun (): while True: n +=1 yield n return fun().next x = make_adder(7) y = x() print y stdout -- 8 y = x() stdout -- 9 ...