Given the following list:
l1={{{1, 4}, {2, 8}, {3, 1}, {4, 9}, {5, 8}, {6, 8}, {7, 5},
{8, 8},{9, 5}, {10, 9}, {11, 1}, {12, 1}}, {{1, 8}, {2, 6}, {3, 6}, {4,
7}, {5, 7}, {6, 10}, {7, 9}, {8, 6}, {9, 9}, {10, 8}, {11,
10}, {12, 7}}, {{1, 1}, {2, 2}, {3, 3}, {4, 10}, {5, 1}, {6,
1}, {7, 1}, {8, 1}, {9, 1}, {10, 2}, {11, 2}, {12, 4}}, {{1,
6}, {2, 4}, {3, 2}, {4, 3}, {5, 9}, {6, 5}, {7, 4}, {8, 9}, {9,
7}, {10, 10}, {11, 5}, {12, 6}}, {{1, 5}, {2, 1}, {3, 10}, {4,
5}, {5, 2}, {6, 2}, {7, 6}, {8, 3}, {9, 4}, {10, 5}, {11, 7}, {12,
8}}, {{1, 9}, {2, 10}, {3, 7}, {4, 2}, {5, 10}, {6, 3}, {7, 8}, {8,
10}, {9, 8}, {10, 1}, {11, 4}, {12, 10}}, {{1, 3}, {2, 5}, {3,
5}, {4, 8}, {5, 6}, {6, 6}, {7, 2}, {8, 5}, {9, 10}, {10, 7}, {11,
6}, {12, 2}}, {{1, 10}, {2, 7}, {3, 8}, {4, 1}, {5, 4}, {6, 7}, {7,
10}, {8, 2}, {9, 3}, {10, 6}, {11, 9}, {12, 5}}, {{1, 7}, {2,
3}, {3, 9}, {4, 6}, {5, 5}, {6, 4}, {7, 7}, {8, 4}, {9, 6}, {10,
3}, {11, 8}, {12, 3}}, {{1, 2}, {2, 9}, {3, 4}, {4, 4}, {5, 3}, {6,
9}, {7, 3}, {8, 7}, {9, 2}, {10, 4}, {11, 3}, {12, 9}}};
How can I create this list:
l2={{4, 8, 1, 6, 5, 9, 3, 10, 7, 2}, {8, 6, 2, 4, 1, 10, 5, 7, 3, 9}, {1,
6, 3, 2, 9, 7, 5, 8, 9, 4}, {9, 7, 10, 3, 5, 2, 8, 1, 6, 4}, {8, 7,
1, 9, 2, 10, 6, 4, 5, 3}, {8, 10, 1, 5, 2, 3, 6, 7, 4, 9}, {5, 9,
1, 4, 6, 8, 2, 10, 7, 3}, {8, 6, 1, 9, 3, 10, 5, 2, 4, 7}, {5, 8, 1,
7, 4, 8, 9, 3, 6, 2}, {9, 8, 2, 10, 5, 1, 7, 6, 3, 4}, {1, 10, 2,
5, 7, 4, 6, 9, 8, 3}, {1, 7, 4, 6, 8, 10, 2, 5, 3, 9}}
Using l1[[All, #, 2]] & /@ Range[1, Length[l1[[All;2]]]] seems particularily inelegant... I'm sure there's a better way.
Each sublist being the second element of each column of the l1 matrix.


Transpose[l1, {3, 2, 1}][[2]]– Marius Ladegård Meyer Nov 17 '16 at 14:37Transpose@Map[Last, l1, {2}]– corey979 Nov 17 '16 at 15:10Transpose@l1[[;; , ;; , 2]]– N.J.Evans Nov 17 '16 at 17:05{3,2,1}. That answer concernsFlatten, but it might still be useful if one can make a mental substitution according to the identityTranspose[m, {i, j, k}] === Flatten[m, {{i}, {j}, {k}}]. – WReach Nov 18 '16 at 00:35