I have a dictionary in the following format where I don’t know the number of lines or items I’m going to receive:
{'line(0).item1':'a', 'line(0).item2':'34',
'line(1).item1':'sd', 'line(1).item2':'2', 'line(1).item3':'fg',
'line(2).item1':'f' ... }
What is the most pythonic way to parse this into a list of dictionaries in the following format:
[{'item1':'a', 'item2':'34'},
{'item1':'sd', 'item2':'2', 'item3':'fg'},
{'item1':'f',...}, ...]
Thanks in advance.
and the output will be the expected: