m3 = [
[11, 12, 13],
[21, 22, 23],
[31, 32, 33],
]
m4 = [
[11, 12, 13, 14],
[21, 22, 23, 24],
[31, 32, 33, 34],
]
mid = lambda m: [
row[
(len(m[0]) - 1) // 2
:len(m[0]) // 2 + 1
]
for row in m
]
assert mid(m3) == [[12], [22], [32]]
assert mid(m4) == [[12, 13], [22, 23], [32, 33]]