check if a year is leap year or not in python with explanation code example Example: python check if year is a leap year import calendar print(calendar.isleap(1900))