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
--
https:
sinnd...@gmail.com writes:
> 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
On Fri, Mar 6, 2020 at 6:55 AM Pieter van Oostrum
wrote:
> sinnd...@gmail.com writes:
>
> > 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,'jk
A better way would be to just do
nestedl = [[2], [], [], [l, b, n]]#nested list
for a in nestedl: #taking all the sublist
for b in a: #iterating through the sub
print(b)
Though it is easy the only limitation is that it works only if the elements are
lists. Which we
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
--
https:
A better way would be to just do
nestedl = [[2], [], [], [l, b, n]]#nested list
for a in nestedl: #taking all the sublist
for b in a: #iterating through the sub
print(b)
Though it is easy the only limitation is that it works only if the elements are
lists. Which we
On Fri, Mar 6, 2020 at 6:55 AM Pieter van Oostrum
wrote:
> sinnd...@gmail.com writes:
>
> > 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,'jk
sinnd...@gmail.com writes:
> 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
On Fri, Mar 6, 2020 at 6:55 AM Pieter van Oostrum
wrote:
> sinnd...@gmail.com writes:
>
> > 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,'jk
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
--
https:
A better way would be to just do
nestedl = [[2], [], [], [l, b, n]]#nested list
for a in nestedl: #taking all the sublist
for b in a: #iterating through the sub
print(b)
Though it is easy the only limitation is that it works only if the elements are
lists. Which we
sinnd...@gmail.com writes:
> 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
On Fri, Mar 6, 2020 at 6:55 AM Pieter van Oostrum
wrote:
> sinnd...@gmail.com writes:
>
> > 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
A better way would be to just do
nestedl = [[2], [], [], [l, b, n]]#nested list
for a in nestedl: #taking all the sublist
for b in a: #iterating through the sub
print(b)
Though it is easy the only limitation is that it works only if the elements
are lists. Which we
sinnd...@gmail.com writes:
> 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:
>
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
--
https
16 matches
Mail list logo