Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
s = 5
r = list(range(s*s))

for i in range(s):
    if i % 2:
        r[i*s:i*s+s] = reversed(r[i*s:i*s+s])

print(r)