xxxxxxxxxx
list_ = ["a", "b", None, "c", None, "d", "e", None, None, "f"]
filtered = list(filter(None, list_))
print(filtered) # ["a", "b", "c", "d", "e", "f"]
xxxxxxxxxx
>>> L = [0, 23, 234, 89, None, 0, 35, 9]
>>> [x for x in L if x is not None]
[0, 23, 234, 89, 0, 35, 9]