Why is this not returning the expected ascending sequence? [closed]

Because you need to increase it in the loop:

month = 11
months =[]

for i in range(5):
    months.append(month + i)

Leave a Comment