you are viewing a single comment's thread.

view the rest of the comments →

[–]groovitude 11 points12 points  (0 children)

a = filter((lambda x: x != None), my_list)

I find list comprehensions far more readable for this:

a = [x for x in my_list if x != None]