how to make a pause function in python