I have a long list of lists formatted like this:
[
[
'iyr:1928',
'cid:150',
'pid:476113241',
'eyr:2039',
'hcl:a5ac0f',
'ecl:#25f8d2',
'byr:2027',
'hgt:190'
],
[
'hgt:168cm',
'eyr:2026',
'ecl:hzl',
'hcl:#fffffd',
'cid:169',
'pid:920076943',
'byr:1929',
'iyr:2013'
],
...
]
And I want to convert it to a list of dicts like this:
[
{
"iyr": "1928",
"cid": "150",
"pid": "476113241",
"eyr": "2039",
"hcl": "a5ac0f",
"ecl": "#25f8d2",
"byr": "2027",
"hgt": "190"
},
{
"hgt": "168cm",
"eyr": "2026",
"ecl": "hzl",
"hcl": "#fffffd",
"cid": "169",
"pid": "920076943",
"byr": "1929",
"iyr": "2013"
},
...
]
I understand that I have to split(':')
each entry in each list, but I don't know how I could then convert that block into a dict.