def f(): def a(i): yield i for i in range(4): yield from a(i) g = f()print(list(g))
Standard input is empty
[0, 1, 2, 3]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!