r/badcode • • Oct 25 '21

python now that's a loading bar

Post image
1.4k Upvotes

44 comments sorted by

View all comments

Show parent comment

1

u/ImCorvec_I_Interject Oct 26 '21 edited Oct 26 '21

Here is an intuitive, easy to read example:

while not done:
  updateProgressBar()
  doStuff()

The functions themselves are left as exercises for the reader.

1

u/exintrovert Nov 21 '21

The next time I need to display a progress bar, I’m just going to print those 3 lines to the screen, verbatim.