jkbbwr
def test(n): while True: n = yield n * n a = test(10) print a.next() print a.send(20) print a.send(50) print a.send(100)