A=[[1,-2,3],
[-4,5,-6],
[7,-8,9]]
temp=A[1:]
l=[]
for i in range(len(temp[0])):
temp1=temp[:]
for j in range(len(temp)):
temp1[j].pop(i)
it is a block of code for the calculation of determinant of a matrix without using the numpy or scipy module .
in this block temp1 should be overwritten after every iteration of i but it isn't and the temp list is also changing.