I have this list of lists:
x = [['x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9', 'x10', 'x11'],
['x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9', 'x10', 'x11'],
['x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9', 'x10', 'x11']]
And I have a declared dictionary like:
d = {"x": None, "y": None, "z": None, "t": None,
"a": None, "s": None, "m": None, "n": None,
"u": None, "v": None, "b": None}
What I want to get is a list or dictionry such as:
result = [{"x": x1,
"y": x2,
"z": x3,
"t": x4,
"a": x5,
"s": x6,
"m": x7,
"n": x8,
"u": x9,
"v": x10,
"b": x11}, {"x": x1,
"y": x2,
"z": x3,
"t": x4,
"a": x5,
"s": x6,
"m": x7,
"n": x8,
"u": x9,
"v": x10,
"b": x11}...]
And so on. One dictionary inside the list per each element inside x (list of lists).
Solutions in python3 are correct,however in python2 would be even better.
d, note that it's of little use to initialize a dictionary like that as for the preferred solution (see Andrej Kesely's answer) you only need the keys. Long story short, just makeda list of keysd = ['x', 'y', ...].