Using If Statement In Lambda Python For Loop