I have a list with numerical and string values, like this:
vals = ["1", "2", "A"]
I want to replace all sting values in this list with "0". So that the new list is: ["1", "2", "0"].
Why does not this work?
[i for i in vals if str(i).isnumeric() else "0"]