Suppose we have a list of integers L in python, and a function F which takes in an integer and returns a boolean. I have the following code:
for i in L:
if F(i):
do_whatever(i)
is there a way of doing this in one line in python, or rather, a more pythonic approach?