human
How to replace empty string with zero in comma-separated string?
assistant
Here is some code to get list of string elements in string `data` delimited by commas, putting `0` in place of empty strings

[(int(x) if x else 0) for x in data.split(',')]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.