iterate through an irregular nested list in Python

sinndhhu sinndhhu at gmail.com
Fri Mar 6 04:59:26 EST 2020


Hi All,
I am new to python.
I have a irregular nested lists in a list. Please help me to iterate through each element.

Thanks much in advance.

Sample Ex

aList = [[2,'jkj'],[],[],['kite',88,'ooo','pop','push','pull'],['hello']]

expected output:
2,jkj,,,kite,88,ooo,pop,push,pull,hello


More information about the Python-list mailing list