how to check for leap year in python calling a function code example Example: python check if year is a leap year import calendar print(calendar.isleap(1900))