# Print array with indices

Is there a single function that prints an array together with the indices? I know how to achieve this with Grid[{Range[n],array},Frame->All], but I vaguely recall there is a special function that achieves this? I am not finding it via searches...

TableForm does the trick:

array = {{"a", "b", "c", "d"}};


More flexible would be a MapIndexed-based solution:
Grid[MapIndexed[{#2[[1]], #} &, array[[1]]] // Transpose,

• Ah, I found TableForm, but did not see the TableHeadings modifier. Thanks! – Joseph O'Rourke Dec 22 '14 at 13:49