def merge_dicts(*dicts): all_items = [] for dictionary in dicts: all_items += dictionary.items() return dict(all_items)