4 ms·
There are plenty of for loops in which you don’t know how many iterations you will have. With a generator, it can even be infinite.
by cowsandmilk 5y ago
There are plenty of for loops in which you don’t know how many iterations you will have. With a generator, it can even be infinite.
- berkes 5y agoIn which case the visualisation will adjust and show this fact. E.g. passing an unbounded range will jus show some info about the past iterations.