가능한 중복은 :
I'm new to python, I can't tell if this will work or not이 코드에 어떤 문제가 있는지 잘 모르겠습니다.
import time
from sys import stdout
varthing = 1
while varthing == 1:
time.sleep(1)
checker = time.strftime("\r%b, %d %H:%M:%S", time.localtime())
print checker,
stdout.flush()
if checker == "Dec, 25 00:00:00" :
print "It's Christmas"
raw_input("Enter anything to close\n")
varthing = 0
내가 잘못 아무것도 표시되지 않습니다. 크리스마스 때 알려주는 시계입니다.
을 무슨 일이 일어날 것으로 기대하고 무엇을 대신 어떻게합니까? –
아무 일도 일어나지 않습니다. 단지 계산됩니다. 지정된 날짜에 도달하면 아무 일도 일어나지 않습니다. – user1080694