remove none in list python code example
Example 1: python delete none from list
>>> 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]
Example 2: how to remove none in python
Not_none_values = filter(None.__ne__, list_of_values)
list_of_values = list(Not_none_values)