I have a list which looks like this:
{1,2,1,2,1,2}
I want to transform it into list that looks like this:
{{1,1},{2,2},{3,1},{4,2},{5,1},{6,2}}
Where the first element in the index of item in the list, and the second element is the element of the list.
How do I do this in Mathematica?
MapIndexed
in the docs. $\endgroup$