human
How to count the number of occurences of `None` in a list?
assistant
Here is some code to print the number of occurences of not `none` in a list `lst` in Python 2

print(len([x for x in lst if x is not None]))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.