I am creating a program in python and I am wondering how I would implement a stopwatch that would print the amount of time it took to complete the task whenever the program finished.
you could do something along the lines of this:
sw = 1000 while (sw>0): sw=sw-1 print("done")
because it reads like a person, it reads up to down, left to right, and when a while/for loop happens it goes back to the beginning. Therefore, it does not read the code below until finished.