What is the most efficient way to do this?

Benji York benji_york at cal-na.com
Fri Feb 8 23:18:02 CET 2002


How about:

>>> l = ['', '1', '2', '3', '', '456', '789', 'wow']
>>> filter(None, l)
['1', '2', '3', '456', '789', 'wow']

--
Benji York
york6 at mindspring.com



More information about the Python-list mailing list