0
How using next() with a generator expression simulates a break statement in a for loop?
I understood that it works but can anyone explain the logic behind how it works?
1 ответ
0
i dont know exactly what you mean, calling next(a) (a ofcourse being a generator) while iterating through it does not break the loop which is iterating through it... could you give me some example code?