I need to extract the inner dictionary from outer list ie remove the outer square brackets of the list.
example:
myList =[{'a':'1','b':'2','c':'3'},{'d':'4','e':'5'}]
Desire output:
{'a':'1','b':'2','c':'3'},{'d':'4','e':'5'}
Please note that inner dictionaries can be of dynamic size.
Any help would be great.
Just accessing the list element by index.
myList =[{'a':'1','b':'2','c':'3'},{'d':'4','e':'5'}] d = myList[0]
So if you have k dictionaries in the list you need to access all of them, but this will be tedious.
k
2.1m questions
2.1m answers
60 comments
57.0k users