human
what is a quick way to delete all elements from a list that do not satisfy a constraint?
assistant
Here is some code to delete all elements from a list `x` if a function `fn` taking value as parameter returns `0`

[x for x in lst if fn(x) != 0]

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