On Jan 2, 8:43�pm, "alex goretoy" <aleksandr.gore...@gmail.com> wrote: > rather, how do I suppress the output of the list with all None in it? > > >>> l=[['3'], ['0', '4'], ['0', '1'], ['0']] > >>> v=[] > >>> [[v.append(j)for j in i if j != "0"] for i in l] > > [[None], [None], [None], []] > > >>> v > ['39', '32', '1'] >
Assign it to something. >>> ignore_me = [[v.append(j)for j in i if j != "0"] for i in l] >>> v ['3', '4', '1'] -- http://mail.python.org/mailman/listinfo/python-list