python - Combine two lists which have the same item in dict -
i have 2 lists named a_list , b_list : a_list = [{'category_id': 1, 'category_name': u'aaa'}, \ { 'category_id': 2, 'category_name': u'bbb'}] b_list = [{'project_count': u'20', 'category_name': u'aaa'}, \ {'project_count': u'31', 'category_name': u'bbb'}] i want make new list, c_list , combines a_list , b_list category_name . resulting list should like: c_list = [{'category_id': 1,'project_count': u'20', 'category_name': u'aaa'},\ {'category_id': 2,'project_count': u'31', 'category_name': u'bbb'}] the goal able access both page_max , 'category_id' same 'category_name'. for entry in c_list: page_num =1 category_name = entry['category_name'] category_id = entry['category_id'] url = 'https://www.test.com?catego...