I have a huge list = {l1, l2, l3, ...}
, which I want to output by labeled rows. My attempt was to
Do[Print["list[i]:"];Print[list[i]], {i, 1, Length[list]}]
Which is not working very well. I would like to know how i can "label" every line of my output like so:
list[1] = l1
list[2] = l2
list[3] = l3
...
Do
loop only exist to create the formatted output and does nothing else, you could consider replacing it with something likeTranspose[{Defer@list /@ Range[Length@list], ConstantArray["=", Length@list], list}] // Grid
orTable[{"list[", i, "] = ", list[[i]]}, {i, Length@list}] // TableForm[#, TableSpacing -> {1, 0}] &
. $\endgroup$ – Karsten 7. Jun 8 '17 at 10:46