ar = [[4, 5, 7],[3, 9, 1],[7, 6, 2]]
flat_list = [item for sublist in ar for item in sublist]
rev = flat_list[::-1] #[9, 8, 7, 6, 5, 4, 3, 2, 1]
steps = list(range(0, len(flat_list), len(ar))) #[0, 3, 6]
patt = list(range(1, len(ar)+1)) + list(range(len(ar)-1, 0, -1)) #[1, 2, 3, 2, 1]
size = len(patt)//2
b = (x for x in steps)

result = []

for i in range(len(patt)):
    if i < size:
        next(b)
        if i - size >= 0:
            result.append(rev[b])
    else:
        b = b+1
        
    
    
0, 1
2, 3




[0]
[3], [1]
[6], [4], [2]
[7], [5]
[8]


[0, 3, 1, 6, 4, 2, 7, 5 ,8]
  +3 -2 +5 -2 -2 +5 -2 +3
  
  +3m+7m+5m+7m+7m+5m+7m+3
  37577573



0, 1, 2,  3
4, 5, 6,  7,
8, 9, 10, 11
12,13,14, 15


0
4, 1
8, 5, 2
12, 9, 6, 3
13, 10, 7
14, 11,
15


15, 11, 14, 7, 10, 13, 3, 6, 9, 12, 2, 5, 8, 1, 4, 0
re

0, 4, 1, 8, 5, 2, 12, 9, 6, 3, 13, 10, 7, 14, 11, 15

















[0]
[3], [1]
[6], [4], [2]


[[4, 5, 7],
 [3, 9, 1],
 [7, 6, 2]]

#other way round: 1/ 4, 2/7, 5, 3/8, 6/9

9/6, 8/3, 5, 7/2, 4/1

16, 14, 11, 7
15, 12, 8,  4
13, 9,  5,  2
10, 6,  3,  1

1, 2, 3
4, 5, 6
7, 8, 9


1,  2,  3,  4
5,  6,  7,  8,
9,  10, 11, 12
13, 14, 15, 16


1,  2,  3,  4,  5
6,  7,  8,  9,  10
11, 12, 13, 14, 15


16/12, 15

[2, 1, 6, 7, 9, 7, 5, 3, 4]


22,
12, 21,
02, 11, 20,
01, 10
00


len(ar[0])


22,
12,
21,
02,
11,
20,
01,
10,
00

ar = [[4, 5, 7],[3, 9, 1],[7, 6, 2]]
flat_list = [item for sublist in ar for item in sublist]
rev = flat_list[::-1] #[9, 8, 7, 6, 5, 4, 3, 2, 1]
steps = list(range(0, len(flat_list), len(ar))) #[0, 3, 6]
patt = list(range(1, len(ar)+1)) + list(range(len(ar)-1, 0, -1)) #[1, 2, 3, 2, 1]
size = len(patt)//2
b = (x for x in steps)

result = []

for i in range(len(patt)):
    if i < size:
        next(b)
        if i - size >= 0:
            result.append(rev[b])
    else:
        b = b+1
        
    
    
0, 1
2, 3




[0]
[3], [1]
[6], [4], [2]
[7], [5]
[8]


[0, 3, 1, 6, 4, 2, 7, 5 ,8]
  +3 -2 +5 -2 -2 +5 -2 +3
  
  +3m+7m+5m+7m+7m+5m+7m+3
  37577573



0, 1, 2,  3
4, 5, 6,  7,
8, 9, 10, 11
12,13,14, 15


0
4, 1
8, 5, 2
12, 9, 6, 3
13, 10, 7
14, 11,
15


15, 11, 14, 7, 10, 13, 3, 6, 9, 12, 2, 5, 8, 1, 4, 0
re

0, 4, 1, 8, 5, 2, 12, 9, 6, 3, 13, 10, 7, 14, 11, 15

















[0]
[3], [1]
[6], [4], [2]


[[4, 5, 7],
 [3, 9, 1],
 [7, 6, 2]]

#other way round: 1/ 4, 2/7, 5, 3/8, 6/9

9/6, 8/3, 5, 7/2, 4/1

16, 14, 11, 7
15, 12, 8,  4
13, 9,  5,  2
10, 6,  3,  1

1, 2, 3
4, 5, 6
7, 8, 9


1,  2,  3,  4
5,  6,  7,  8,
9,  10, 11, 12
13, 14, 15, 16


1,  2,  3,  4,  5
6,  7,  8,  9,  10
11, 12, 13, 14, 15


16/12, 15

[2, 1, 6, 7, 9, 7, 5, 3, 4]


22,
12, 21,
02, 11, 20,
01, 10
00


len(ar[0])


22,
12,
21,
02,
11,
20,
01,
10,
00

#[9, 8, 7, 6, 5, 4, 3, 2, 1] #[0, 3, 6] #[1, 2, 3, 2, 1] #other way round: 1/ 4, 2/7, 5, 3/8, 6/9