lit = [] for i in range(1900,2881): if i % 400 == 0 or i % 4 == 0 and i % 100 != 0: lit.append(i) i = 0 for j in lit: if (i+1) % 10 != 0: print(j,end=" ") i += 1 else: print(j) i = 0