I have this problem that I need to work out however it is proving difficult and I do not know where I went wrong. I do not know what I need to put in order to only have 10 years printed per line. My code so far is as follows def main():
leap_start = int(input("Enter a start year: "))
leap_end = int(input("Enter an end year: "))
print("Here is a list of leap years between", leap_start,"and",leap_end, ":" )
for year in range(leap_start, leap_end):
if (year% 400) !=0 and (year % 1000 == 0) and (year % 4) == 0:
print ("", end = "")
elif (year % 4) == 0:
print (start, end = ",")
elif (year % 100) == 0 and (year % 400) == 0:
print (start, end =",")
for y in range ((len(years)// 10) + 1):
pri = years [10*y:(y+10) + 10]
print(*pri, sep = ",")
else :
print ("", end = ",")