I have lists J and cond1. I want to print the values in J corresponding to False in each sublist of cond1. I present the current and expected outputs.
J=[[1, 2, 4, 6, 7], [1, 4]]
cond1=[[[False, True, False, True, False]], [[False, True]]]
result = [value for value, condition in zip(J, cond1) if not condition]
print(result)
The current output is
[]
The expected output is
[[1,4, 7],[1]]