i'm trying figure out method merge 2 lists in python in order accomplish this: list_a = [(item_1, attribute_x), (item_2, attribute_y), (item_3, attribute_z)] list_b = [(item_1, attribute_n), (item_3, attribute_p) ] as result: list_result = [(item_1, attribute_x, attribute_n), (item_2, attribute_y, false), (item_3, attribute_z, attribute_p)] any ideas? here interesting way solve problem, robust function returns generator: def combine_item_pairs(l1, l2): d = {k:[v, false] k, v in l1} key, value in l2: if key in d: d[key][1] = value else: d[key] = [false, value] return (tuple([key]+value) key, value in d.iteritems()) using it: >>> list(combine_item_pairs(list_a, list_b)) [('item_2', 'attribute_y', false), ('item_3', 'attribute_z', 'attribute_p'), ('item_1', 'attribute_x', 'attribute_n')] here bonus solution (same interface, more ef...