0
So after the code is done, i will be 5 or do I understand it wrong?
//If I use yield def countdown(): i=5 while i > 0: yield i i -= 1 for i in countdown(): print(i)
1 Answer
0
what does yield actually do then
//If I use yield def countdown(): i=5 while i > 0: yield i i -= 1 for i in countdown(): print(i)