1def is_leap(year):
2 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
1year = int(input("Write any year to check if it is leap year:- "))
2if year % 4 == 0:
3 if year % 100 == 0:
4 if year % 400 == 0:
5 print("Leap year.")
6 else:
7 print("Not leap year.")
8 else:
9 print("Leap year.")
10else:
11 print("Not leap year.")