origHash=matrixHash.copy() for cutadd in range(cutrange): matrixHash=origHash.copy() for trimstep in range(trimrange): use_and_modify(matrixHash)