So after the code is done, i will be 5 or do I understand it wrong? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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)

27th Apr 2018, 9:02 AM
Elias
Elias - avatar
1 Answer
0
what does yield actually do then
27th Apr 2018, 9:12 AM
Elias
Elias - avatar