判断闰年条件, 满足年份模400为0, 或者模4为0但模100不为0. import timethisyear = time.localtime()[0]if thisyear % 400 == 0 or thisyear % 4 ==0 and thisyear % 100 != 0:print ('this year %s is a leap year' % thisyear)else:print ('this year %s is not a leap year' % thisyear)this year 2015 is ...【阅读全文】