def minor(n, array):
array.pop(0)
for item in array:
item.pop(n)
return array
a = [[1, 2, 9],
[4, 5, 6],
[7, 8, 9]]
с = minor(1 ,a)
print(a)
с = minor(1, a[:])
, в таком случаеarray.pop(0)
- не работает, for item in array: item.pop(n)
>>> a = [[1,2,3], [11,12,13], [22,33,44]]
>>> a[1][1]
12
>>> b = a[:] # копируем!
>>> b[1][1]=0
>>> b
[[1, 2, 3], [11, 0, 13], [22, 33, 44]]
>>> a
[[1, 2, 3], [11, 0, 13], [22, 33, 44]]
>>>