Removing None objects from a sequence
steve at REMOVE-THIS-cybersource.com.au
Sat Dec 13 17:13:24 CET 2008
On Sat, 13 Dec 2008 11:07:53 +0000, Steven D'Aprano wrote:
> Now, sure, most of the work in Tim's version is executed in fast C code
> instead of slow Python code.
I'm sorry, I must have been smoking crack when I wrote that. It does
nothing of the sort. Tim's version is pure Python.
alist[:] = [x for x in alist if x is not None]
More information about the Python-list