这将始终打印错误。如何检查日期是否在数组中并打印正确的内容?
dates = [ "2012-09-03",
"2012-10-08",
"2012-10-09",
"2012-11-12",
# .. more values snipped for brevity
"2013-04-19",
"2013-05-27", ]
if date.today() in dates:
print "true"
elif date.today() not in dates:
print "false"