I have two functions (generator).
def a():
yield 1
yield 2
def b():
yield 'A'
yield 'B'
yield a()
Now I want to iterate over b() and expect it should output A B 1 2. But no. Its giving this.
In [11]: for i in b():
....: print i
....:
A
B
<generator object a at 0x10fc3ddc0>
How can I get the required output?
A B 1 2? You'reyielding the generator object itself, not its contents.