[Tutor] build list of non-empty variables

John Fouhy john at fouhy.net
Wed Jul 9 03:35:48 CEST 2008

On 09/07/2008, bob gailer <bgailer at gmail.com> wrote:
>  or just [ x for x in LIST if x ]

or filter(None, LIST).  But that's a bit obscure.

(fractionally faster, though, according to my brief experiment with timeit)


More information about the Tutor mailing list