3 ms·
For things with a fixed length, it looks it up ahead of time (i.e. things that return things when you call len() on them). For other things such as generators,
by wedn3sday 5y ago
For things with a fixed length, it looks it up ahead of time (i.e. things that return things when you call len() on them). For other things such as generators, you can supply a total=N value when you create the progress bar. If you dont know the total ahead of time, it doesnt give you a percent completion, but still tells you thinks like number of iterations per second and number of iterations finished.