keys = ["x","y","z","x*x","2*y","2*z+3*x*x","w"]
values = [[0.00221024, 0.00289774, 0.00362644, 0.00222213, 0.00289774, 0.00243777, 0.00346482]]
dict_values = dict(zip(keys,zip(*values)))
output:
{'x' : (0.00221024,)
'y' : (0.00289774,)
'z' : (0.00362644,)
'x*x' : (0.00222213,)
'2*y' : (0.00289774,)
'2*z+3*x*x':('0.00243777,')
'w' : (0.00346482,)}
Excepted Output:
{'x' : 0.00221024,
'y' : 0.00289774,
'z' : 0.00362644,
'x*x' : 0.00222213,
'2*y' : 0.00289774,
'2*z+3*x*x': 0.00243777,
'w' : 0.00346482,}
I tried dict and zip function but can anyone explain how to write a loop or any logic to match with the excepted output.