# cs235
# Yuxiao Wang
# hw1
# question 3
## for test list:
a = [2011,2344,2000,2008,2016,1995,987,3028,4762,2018,2400]
def checkYear(a):
return all (1000<=x<3000 for x in a)
def remove(a):
if checkYear(a) == False:
return [x for x in a if 1000<=x<3000]
def leap(a):
b = remove(a)
return {x for x in b if (x%4==0 and x%100!=0) or (x%400==0)}