Advertisement
Rementai

Lata przestępne

Mar 9th, 2023
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. def leap_years(start_year, end_year):
  2.  
  3.     list = [i for i in range(start_year, end_year+1) if i % 4 == 0 and (i % 100 != 0 or i % 400 == 0)]
  4.     return list
  5.  
  6. print(leap_years(1900,2000))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement