In order to get list x4
from list x1
, I used three operations. How to get list x4
in one operation or as simple as possible?
ClearAll["Global`*"]
x1 = {{{7, -1.5}, {7, 0.2}, {7, -0.2}, {7, 1}, {7,
0.08}, {7, -0.0}, {7, 0.4}, {7, -0.2}, {7, 2}, {7,
3}}, {{-8, -1.9}, {-8, 0.3}, {-8, -0.2}, {-8, -0.1}, {-8,
2}, {-8, -0.0}, {-8, 4}, {-8, 7}, {-8, 1}, {-8, 6}}, {{-1,
2.5}, {-1, -0.3}, {-1, 0.2}, {-1,
0.1}, {-1, -0.0}, {-1, -0.05}, {-1, 3}, {1, 7}, {-1, 5}, {1,
1}}, {{5, -2.7}, {5, 0.3}, {5, -0.2}, {5, 2}, {5, 7}, {5, 8}, {5,
3}, {5, 6}, {5, 1}, {5, 1}}};
x2 = Flatten[x1, {2, 1}]
x3 = Partition[x2, {4, 2}]
x4 = Flatten[x3, 1]