I have some confuse about the recursive generator where the code mixing Yield
and return keywork as below. I understand that "return" keywork just raise
StopIteration exception but can not understanding in depth, so, could some one
explain me about the actual function of two "return" keyworks in case it have
other function and mechanism of for running this code segment below:
<code>
def fg(args):
if not args:
yield ""
return
for i in args[0]:
for tmp in fg(args[1:]):
yield i + tmp
return
print(list(fg(['abc', 'xyz', '123'])))
</code>
--
https://mail.python.org/mailman/listinfo/python-list