Python replace a "no value" or " " with a 0

Hi I need to replace a “no value” or " " with a 0 using a python script. Is my logic wrong here as it doesn’t seem to affect the no anything? Any insight would be much appreciated, Thanks!

You’re not going deep enough into your list structure. You’re checking if the sublist is blank instead of the individual values. You could also use a simple IF statement in a codeblock instead of python.

val == "" ? 0 : val;


Thanks for the quick response @Nick_Boyts, that code block worked like a charm appreciate the help.