import random as r
def function(n,m):
matrix = [[r.randint(0,100) for x in range(n)] for y in range(m)]
for a in matrix:
print(a)
a.insert(0,a.pop(a.index(max(a
a.append(a.pop(a.index(min(a
print("--"*(n+10))
for q in matrix:
print(q)
z = int(input("Сколька столбцов?: "))
c = int(input("Сколька строк?: "))
function(z,c)
import random as r
def function(n,m):
matrix = [[r.randint(0,100) for x in range(n)] for y in range(m)]
for a in matrix:
print(a)
a.insert(0,a.pop(a.index(max(a
a.append(a.pop(a.index(min(a
print("--"*(n+10))
for q in matrix:
print(q)
z = int(input("Сколька столбцов?: "))
c = int(input("Сколька строк?: "))
function(z,c)