How To Pause A Function In Python