I have a list containing elements like
list1 = [['Test Name', 'Results', 'Units', 'Bio. Ref. Interval'],
['Cholesterol, Total', '243.00', 'mg/dL', '<200.00'],
['Triglycerides', '365.00', 'mg/dL', '<150.00'],
['HDL Cholesterol', '48.56', 'mg/dL', '>50.00'],
['LDL Cholesterol, Calculated', '121.44', 'mg/dL', '<100.00'],
['VLDL Cholesterol, Calculated *', '73.00', 'mg/dL', '<30.00'],
['Non-HDL Cholesterol', '194', 'mg/dL', '<130']]
I want to use list1[0] that is, ['Test Name', 'Results', 'Units', 'Bio. Ref. Interval'] to make it as key and want output something like the following multidimensional dictionary.
{
{ Testname : 'Cholesterol, Total' {
Result : '243.00',
Units : 'mg/dL',
Bio. Ref. Interval : '<200.00'
},....
....
{ Testname : 'Non-HDL Cholesterol' { Result : '194', Units : 'mg/dL', Bio. Ref. Interval : '<130'}}
}
I'm newbie to python. Help out please.
"Testname : 'Non-HDL Cholesterol'"? Your expected output is not a valid dict