I have three lists and three keys for each list, and would like to convert them into a list of dictionaries.
list1 = [1, 2, 3]
list2 = ['a', 'b', 'c']
list3 = [5.0, 6.0, 7.0]
keys = ['key1', 'key2', 'key3']
my expected output is this,
[[{'key1': 1, 'key2': 'a', 'key3': 5.0}],
[{'key1': 2, 'key2': 'b', 'key3': 6.0}],
[{'key1': 3, 'key2': 'c', 'key3': 7.0}]]
What's the most pythonic way of achieving this output?