Title: Issue consistently mapping a python list to dictionary
Tags: python,list,dictionary,qgis,pyqgis

Question: I am trying to understand why my list (update_features in code below) isn't consistently mapping properly to a dictionary (update_reno_map in code below). There is a bit of code leading up to the mapping, that i've included to give context to the way the list is created.
renouv_dict = {}

layer = iface.activeLayer()

fields = layer.fields()

age = fields.indexFromName('elec_moa_hta_2023')

year_proj_renew = fields.indexFromName('a_proj_r')

provider = layer.dataProvider()



with open("traitements/renouvellement_par_annee.csv", newline='') as csvfile:
    year_reader = csv.reader(csvfile, delimiter=';', quotechar='|')
    for row in year_reader:
        year = 0
        if row[0] != 'annee':
            renouv_dict[row[0]] = []
            for item in row[1:]:
                renouv_dict[row[0]].append((year,item))
                year += 1

for key, value in renouv_dict.items():
    year_renew = key
    print(year_renew)
    for renew_tuples in value:
        age_renew = renew_tuples[0]
        number_renew = renew_tuples[1]
        print(str(age_renew) +'-->AGE')
        if int(number_renew) > 0:
            try:
                processing.run("qgis:randomselectionwithinsubsets", {'INPUT':layer, 'FIELD':"age_a_x", 'METHOD':0, 'NUMBER':number_renew})
                update_features = []
                for feature in layer.selectedFeatures():
                    if feature['age_a_x'] == age_renew and not feature['a_proj_r']:
                        update_features.append(feature)
                if len(update_features) < int(number_renew):
                    print('ADDING FEATURES---')
                    print(len(update_features))
                    print(number_renew)
                    features_to_add = int(number_renew) - len(update_features)
                    print(features_to_add)
                    renew_age_features = list(layer.getFeatures('"age_a_x" =' + str(age_renew) + 'and "a_proj_r" is null'))
                    num_avail = len(list(renew_age_features))
                    print('number of available to add' + str(num_avail))
                    for x in range (0,features_to_add):
                        try:
                            update_features.append(renew_age_features[x])
                        except IndexError:
                            print ('no more entities at this age')
                print('number of features total to update ---' + str(len(update_features)))
                update_reno_map = {}
                a_proj_r_field = provider.fields().indexFromName('a_proj_r')
                for feature in update_features:
                    update_reno_map[feature.id()] = {a_proj_r_field:year_renew}
                print(len(update_reno_map))
                print(update_reno_map)
                provider.changeAttributeValues(update_reno_map)
            except QgsProcessingException:
                print('cant run')
    updateMap = {}
    age_a_x_field = provider.fields().indexFromName('age_a_x')
    features = provider.getFeatures()
    for feature in features:
        new_age = int(feature['age_a_x']) + 1
        updateMap[feature.id()] = {age_a_x_field:new_age}
    provider.changeAttributeValues(updateMap)

This is what renouv_dict is, as the csv isn't included here:
{'2023': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '0'), (24, '0'), (25, '3'), (26, '0'), (27, '0'), (28, '0'), (29, '0'), (30, '5'), (31, '0'), (32, '0'), (33, '5'), (34, '159'), (35, '1'), (36, '19'), (37, '0'), (38, '0'), (39, '0'), (40, '25'), (41, '0'), (42, '0'), (43, '0'), (44, '3'), (45, '1'), (46, '0'), (47, '0'), (48, '1'), (49, '0'), (50, '0'), (51, '222')], '2024': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '0'), (24, '0'), (25, '0'), (26, '5'), (27, '0'), (28, '0'), (29, '0'), (30, '0'), (31, '6'), (32, '0'), (33, '0'), (34, '4'), (35, '150'), (36, '0'), (37, '11'), (38, '0'), (39, '0'), (40, '0'), (41, '5'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '181')], '2025': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '0'), (24, '0'), (25, '0'), (26, '1'), (27, '6'), (28, '0'), (29, '0'), (30, '0'), (31, '0'), (32, '6'), (33, '0'), (34, '0'), (35, '3'), (36, '108'), (37, '1'), (38, '6'), (39, '0'), (40, '0'), (41, '0'), (42, '1'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '132')], '2026': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '1'), (24, '0'), (25, '0'), (26, '1'), (27, '1'), (28, '6'), (29, '0'), (30, '0'), (31, '0'), (32, '0'), (33, '5'), (34, '0'), (35, '0'), (36, '2'), (37, '63'), (38, '0'), (39, '3'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '82')], '2027': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '0'), (24, '1'), (25, '0'), (26, '0'), (27, '1'), (28, '1'), (29, '7'), (30, '0'), (31, '0'), (32, '0'), (33, '0'), (34, '4'), (35, '0'), (36, '0'), (37, '2'), (38, '32'), (39, '0'), (40, '1'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '49')], '2028': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '0'), (24, '0'), (25, '1'), (26, '0'), (27, '0'), (28, '1'), (29, '1'), (30, '9'), (31, '0'), (32, '0'), (33, '0'), (34, '0'), (35, '4'), (36, '0'), (37, '0'), (38, '1'), (39, '13'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '30')], '2029': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '1'), (24, '0'), (25, '0'), (26, '2'), (27, '0'), (28, '0'), (29, '1'), (30, '1'), (31, '10'), (32, '0'), (33, '0'), (34, '0'), (35, '0'), (36, '2'), (37, '1'), (38, '0'), (39, '0'), (40, '6'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '24')], '2030': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '1'), (24, '1'), (25, '0'), (26, '0'), (27, '2'), (28, '0'), (29, '0'), (30, '2'), (31, '1'), (32, '10'), (33, '0'), (34, '0'), (35, '0'), (36, '0'), (37, '2'), (38, '0'), (39, '0'), (40, '0'), (41, '2'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '21')], '2031': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '0'), (24, '1'), (25, '1'), (26, '0'), (27, '0'), (28, '2'), (29, '0'), (30, '0'), (31, '2'), (32, '1'), (33, '8'), (34, '0'), (35, '0'), (36, '0'), (37, '0'), (38, '1'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '16')], '2032': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '0'), (24, '0'), (25, '1'), (26, '2'), (27, '0'), (28, '0'), (29, '3'), (30, '0'), (31, '0'), (32, '2'), (33, '1'), (34, '7'), (35, '0'), (36, '0'), (37, '0'), (38, '0'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '16')], '2033': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '1'), (22, '1'), (23, '0'), (24, '0'), (25, '0'), (26, '2'), (27, '3'), (28, '1'), (29, '0'), (30, '3'), (31, '0'), (32, '0'), (33, '1'), (34, '1'), (35, '6'), (36, '0'), (37, '0'), (38, '0'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '19')], '2034': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '1'), (23, '1'), (24, '1'), (25, '0'), (26, '0'), (27, '3'), (28, '3'), (29, '1'), (30, '0'), (31, '4'), (32, '0'), (33, '0'), (34, '1'), (35, '1'), (36, '5'), (37, '1'), (38, '0'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '22')], '2035': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '1'), (23, '2'), (24, '1'), (25, '1'), (26, '0'), (27, '0'), (28, '3'), (29, '3'), (30, '1'), (31, '0'), (32, '4'), (33, '0'), (34, '0'), (35, '1'), (36, '1'), (37, '3'), (38, '0'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '21')], '2036': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '1'), (24, '2'), (25, '2'), (26, '2'), (27, '1'), (28, '0'), (29, '3'), (30, '4'), (31, '1'), (32, '0'), (33, '3'), (34, '0'), (35, '0'), (36, '1'), (37, '1'), (38, '1'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '22')], '2037': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '0'), (24, '1'), (25, '3'), (26, '3'), (27, '2'), (28, '1'), (29, '0'), (30, '4'), (31, '5'), (32, '0'), (33, '1'), (34, '3'), (35, '0'), (36, '0'), (37, '1'), (38, '0'), (39, '1'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '25')], '2038': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '0'), (24, '0'), (25, '2'), (26, '6'), (27, '4'), (28, '2'), (29, '1'), (30, '0'), (31, '5'), (32, '5'), (33, '1'), (34, '0'), (35, '2'), (36, '0'), (37, '0'), (38, '0'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '28')], '2039': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '0'), (24, '0'), (25, '1'), (26, '3'), (27, '7'), (28, '4'), (29, '2'), (30, '1'), (31, '0'), (32, '4'), (33, '4'), (34, '0'), (35, '0'), (36, '2'), (37, '0'), (38, '0'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '28')], '2040': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '1'), (22, '1'), (23, '0'), (24, '0'), (25, '1'), (26, '1'), (27, '4'), (28, '8'), (29, '4'), (30, '3'), (31, '1'), (32, '0'), (33, '4'), (34, '3'), (35, '0'), (36, '0'), (37, '1'), (38, '0'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '32')], '2041': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '1'), (23, '1'), (24, '0'), (25, '0'), (26, '1'), (27, '2'), (28, '4'), (29, '9'), (30, '6'), (31, '4'), (32, '1'), (33, '0'), (34, '3'), (35, '3'), (36, '0'), (37, '1'), (38, '1'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '37')], '2042': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '1'), (24, '1'), (25, '0'), (26, '0'), (27, '2'), (28, '2'), (29, '4'), (30, '11'), (31, '7'), (32, '4'), (33, '1'), (34, '0'), (35, '3'), (36, '2'), (37, '1'), (38, '0'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '39')], '2043': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '0'), (24, '2'), (25, '2'), (26, '0'), (27, '0'), (28, '2'), (29, '2'), (30, '6'), (31, '13'), (32, '6'), (33, '3'), (34, '0'), (35, '0'), (36, '2'), (37, '2'), (38, '0'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '40')], '2044': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '0'), (23, '0'), (24, '0'), (25, '3'), (26, '3'), (27, '0'), (28, '0'), (29, '2'), (30, '2'), (31, '7'), (32, '12'), (33, '6'), (34, '2'), (35, '0'), (36, '0'), (37, '1'), (38, '1'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '39')], '2045': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '1'), (22, '0'), (23, '0'), (24, '0'), (25, '1'), (26, '5'), (27, '4'), (28, '1'), (29, '0'), (30, '2'), (31, '3'), (32, '6'), (33, '11'), (34, '4'), (35, '2'), (36, '0'), (37, '1'), (38, '1'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '42')], '2046': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '1'), (22, '2'), (23, '0'), (24, '0'), (25, '0'), (26, '1'), (27, '6'), (28, '5'), (29, '1'), (30, '1'), (31, '3'), (32, '3'), (33, '6'), (34, '9'), (35, '4'), (36, '2'), (37, '1'), (38, '0'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '45')], '2047': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '1'), (22, '2'), (23, '3'), (24, '0'), (25, '0'), (26, '0'), (27, '1'), (28, '7'), (29, '5'), (30, '1'), (31, '1'), (32, '3'), (33, '2'), (34, '4'), (35, '8'), (36, '3'), (37, '1'), (38, '0'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '42')], '2048': [(0, '0'), (1, '0'), (2, '0'), (3, '0'), (4, '0'), (5, '0'), (6, '0'), (7, '0'), (8, '0'), (9, '0'), (10, '0'), (11, '0'), (12, '0'), (13, '0'), (14, '0'), (15, '0'), (16, '0'), (17, '0'), (18, '0'), (19, '0'), (20, '0'), (21, '0'), (22, '1'), (23, '3'), (24, '4'), (25, '0'), (26, '0'), (27, '0'), (28, '2'), (29, '8'), (30, '6'), (31, '1'), (32, '0'), (33, '2'), (34, '2'), (35, '4'), (36, '6'), (37, '2'), (38, '1'), (39, '0'), (40, '0'), (41, '0'), (42, '0'), (43, '0'), (44, '0'), (45, '0'), (46, '0'), (47, '0'), (48, '0'), (49, '0'), (50, '0'), (51, '42')]}

Also, I was hoping to post the console output here, but it's too long. Lmk if that could help anyone help me : )

Answer: Turns out some of the features in "update_features" are represented twice (same id). They are thus mapped twice to the same key in "update_reno_map". Added a condition to eliminate the repeats.