I've been struggeling with the command riffle.
list = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}, {13,14, 15}}
How do I use riffle like this, but add 1 to "X", every time it gets inserted? So when it has inserted "X" 5 times, it would be X5, instead of just "X".
"X" is a string.
Riffle[list, "X", 3]
{{1, 2, 3}, {4, 5, 6}, X, {7, 8, 9}, {10, 11, 12}, X, {13, 14, 15}}
The output I am looking for:
{{1, 2, 3}, {4, 5, 6}, X1, {7, 8, 9}, {10, 11, 12}, X2, {13, 14, 15}}
@<name>
. I repeat those thing because see that you like to quickly ask a lot of questions =)) $\endgroup$