from collections import defaultdict def list_to_dict(): a_dict = defaultdict(list) for key, value in a_list: a_dict[key].append(value) return a_dict