# How to number each element of a list to form a table of points? [closed]

Suppose we have a list given below

OurList={a,b,c,d,e}


Is there a way to attribute a number to each element of OurList so that we could form a table of points? The expected result is

OutTable={{1,a},{2,b},{3,c},{4,d},{5,e}}

• Transpose[{Range[1, Length@ourList], ourList}]. Please do not start variable names with uppercase characters. OR Thread[{Range[1, Length@#], #}] &@ourList
– Syed
Mar 16, 2022 at 12:34
• Look at List Manipulation Mar 16, 2022 at 13:26

There are may be 10 others ways to do this, but this is good problem for using MapIndexed

lis = {a, b, c, d, e}
MapIndexed[{First[#2], #1} &, lis] MapIndexed[{2*First[#2], #1} &, lis] • Does this method generalise to using a formula instead of 1,2,3,4... to label each element of a list in order? For example I might want {{2,a},{4,b}...} instead so the numbering formula is for nth element of a list, the corresponding number should be 2t instead of t, is there a way your method could be extended to include this scenario? Mar 16, 2022 at 12:44
• @Rescy_ updated. Mar 16, 2022 at 12:47