写一串判断闰年的代码
def is_leap_year(year): """ 判断是否为闰年 :param year: 年份 :return: True or False """ if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0: return True else: return False
原文地址: https://www.cveoy.top/t/topic/9CH 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
def is_leap_year(year): """ 判断是否为闰年 :param year: 年份 :return: True or False """ if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0: return True else: return False
原文地址: https://www.cveoy.top/t/topic/9CH 著作权归作者所有。请勿转载和采集!