Check if Given Year is Leap Year using Python

calendar module

import calendar

year = 2024
isLeapYear = calendar.isleap(year)

print(isLeapYear)

Leave a Comment

Cancel reply

Your email address will not be published.