Removing None objects from a sequence

Filip Gruszczyński gruszczy at gmail.com
Fri Dec 12 08:08:04 EST 2008


I am not doing it, because I need it. I can as well use "if not elem
is None", but I just wanted to know, if there is some better way of
doing this. I like to know :-)

And I can't understand why you are becoming so aggressive because of
this. Just because I asked for that, doesn't mean, that I will put
some obfuscated code into my project. I just wanted to learn something
new - I checked itertools, I googled a bit, now I wanted to ask here
if someone knew some really cool way of this.  All the other
assumptions weren't really necessary.

Thanks for those ideas, however. I like the last one a lot :)

-- 
Filip Gruszczyński


More information about the Python-list mailing list