• + 0 comments
    def is_leap(year):
        leap = False
        
        if year % 4 == 0 and (year % 100 != 0 or year % 400 == 0):
            leap = True
            
        # 2-d option with builtin function (commented):
        # leap = __import__('calendar').isleap(year)
        
        return leap