from random import randint
a = [[randint(1,10) for i in range(10)] for i in range(5)] # создаём матрицу 5x10
[print(*i) for i in a] # выводим
pr = 1
for i in range(len(a)): # считаем произведение элементов
for ii in a[i]:
pr *= ii
print(pr)
from random import randint
a = [[randint(1,10) for i in range(10)] for i in range(5)] # создаём матрицу 5x10
[print(*i) for i in a] # выводим
pr = 1
for i in range(len(a)): # считаем произведение элементов
for ii in a[i]:
pr *= ii
print(pr)