I'd like to print an update on what's processing, then process it, then print a 'done' statement. The code below prints "waiting ... done" after the 2 second sleep finishes. How can I get the first print statement to execute before the code between the print statements executes?
import time
print("waiting ...", end=" ")
time.sleep(2)
print("done")