Python code that forces you to take a break