Using dictionary comprehension to create a dictionary from list of dictionaries
Using dictionary comprehension to create a dictionary from list of dictionaries Question: This is my original code, it works as I need: import collections import json import yaml file_list = [ {‘path’: ‘/path/to/file1’, ‘size’: 100, ‘time’: ‘2022-02-15’}, {‘path’: ‘/path/to/file2’, ‘size’: 200, ‘time’: ‘2022-02-13’}, {‘path’: ‘/path/to/file3’, ‘size’: 300, ‘time’: ‘2022-02-12’}, {‘path’: ‘/path/to/file4’, ‘size’: 200, ‘time’: ‘2022-02-11’}, …