how to wait for a program to finish in python code example Example: making a function wait in python from time import sleep >>> sleep(4)