minyear = 2008
maxyear = 2013
new_a = []
for group in A:
    group = group
years = [point[0] for point in group]
print(years)
for year in range(minyear, maxyear + 1):
    if year not in years:
        group.append([year, 0])
new_a.append(sorted(group))
print(new_a)
Insert missing dates while keeping the date order in python list