from random import randint
n, m = 5, 5
A = [[randint(1, 10) for j in range(m)] for i in range(n)]
for row in A:
for x in row:
print("{:4d}".format(x), end='')
print()
b = [sum(x) for x in zip(*A)]
print('Суммы по столбцам')
print(b)
k = b.index(min(b))
print('Индекс столбца с наименьшей суммой : ', k)
print('----------------')
for i in range(m) :
print(A[i][k])
from random import randint
n, m = 5, 5
A = [[randint(1, 10) for j in range(m)] for i in range(n)]
for row in A:
for x in row:
print("{:4d}".format(x), end='')
print()
b = [sum(x) for x in zip(*A)]
print('Суммы по столбцам')
print(b)
k = b.index(min(b))
print('Индекс столбца с наименьшей суммой : ', k)
print('----------------')
for i in range(m) :
print(A[i][k])