I have a list which sometimes looks like:
list = {{},{}}
I need to catch these occurrences and replace them with {{0,0},0}.
The following hasn't worked
So,
If list==Null, list /. {{}, {}} -> {{0, 0}, 0},]
Example
data = {{{}, {}}, {{1, 2}, {1, 1}}, {{3, 3}, {4, 4}}};
data /. {{}, {}} -> {{0, 0}, 0}
Output
{{{0, 0}, 0}, {{1, 2}, {1, 1}}, {{3, 3}, {4, 4}}}
If
statement the way you presented it. Simplylist /. {{}, {}} -> {{0, 0}, 0}
should do the trick. $\endgroup$