Hi,
I have a large list of 1*2 lists that contain various dummy variables, something like
list = {{a, b + c}, {u, y - h}, {d, g + h}, {d, 0}, {v, 0}}
I want to remove every element that has zero as the second entry, I have tried Select, DeleteCases andCases but none worked because Mathematica tried to equate variables to zero
My original post got corrupted and it repeated Gianluca’s post.
I added to Gianluca’s answer that there are many ways to do this and that your original attempts may have worked if you used === (SameQ) instead of ==. Mathematica does not know if g+h == 0 because g and h are not yet defined. However, Mathematica does know that g+h are not identical to 0. So if you are testing in Select, DeleteCases, Cases, etc. you usually need to use SameQ or UnSameQ and not Equals