On 12 Apr 2013 21:25, "Steven D&apos;Aprano" <[email protected]> wrote:

> Also, you might find it easier to process the list if you strip out empty
items. There are two simple ways to do it:
>
>
> lst = [x for x in list if x != '']
> # or
> lst = filter(None, lst)

Hi all,

For the first, I would use

lst = [x for x in list if x]

instead.

Best,

Brian vdB
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to