python: how to convert list of lists into a single nested list
- by Bhuski
I have a python list of lists as shown below:
mylist=[ [['orphan1', ['some value1']]],
[['parent1', ['child1', ['child', ['some value2']]]]],
[['parent1', ['child2', ['child', ['some value3']]]]] ]
I need to convert the above list to some thing like this:
result=[ ['orphan1', ['some value1']],
['parent1', ['child1', ['child', ['some…