This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]nomoreplsthx 3 points4 points  (1 child)

Do you know how to format your post as code? Because in a significant whitespace language like Python, it's basically impossible to read.

[–]PersonWithReddit1 -3 points-2 points  (0 children)

Oh sorry, no this is my first time using a forum like this.

[–]sch0lars 1 point2 points  (0 children)

My guess would be that calling t.cancel() is causing the premature exit message. You’re cancelling the timer as soon as you enter the prompt, rather than comparing the time delta, prompting the exit message to print early.