Given the following nested list,
myList=([1,[2,3],[[4,5,[6],7],8,9]])
I want to reverse it to be converted into:
myList= [[[4, 5, [6], 7], 8, 9], [2, 3], 1]
How do I do that? Thanks.
Given the following nested list,
myList=([1,[2,3],[[4,5,[6],7],8,9]])
I want to reverse it to be converted into:
myList= [[[4, 5, [6], 7], 8, 9], [2, 3], 1]
How do I do that? Thanks.
Actually it is quite easy, you can reverse this :
myList=([1,[2,3],[[4,5,[6],7],8,9]])
by
myList = myList[::-1]
That's it !