How to make a progress bar for a function in python

So, I have a function that takes a long time to complete. I want to know how to make a progress bar of a function, the code is as follows:

def some_function(): #do something #do something #do something print('finished') 

Exit

 [========== ] 40% [============== ] 60% [================= ] 80% finished [===================] 100% 

it will be good if it is updated in the same place

+4
source share

All Articles