Hello Stack Overflow Community,
I have a list where I want to replace values with None where condition() returns True.
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
For example, if condition checks bool(item%2) should return:
[None, 1, None, 3, None, 5, None, 7, None, 9, None]
What is the most efficient way to do this?