def setZeroes_error(self, matrix):
        if not matrix:
            return

        m = len(matrix)
        n = len(matrix[0])

        for row in xrange(m):
            for col in xrange(n):
                if matrix[row][col]==0:
                    matrix[0][col]=0  # previously scanned, safe to modify
                    matrix[row][0]=0  # previously scanned, safe to modify

        for row in xrange(m):
            if matrix[row][0]==0:
                for col in xrange(n):
                    matrix[row][col] = 0

        for col in xrange(n):
            if matrix[0][col]==0:
                for row in xrange(m):
                    matrix[row][col] = 0
store the zero at the head
dataset/ETHPy150Open algorhythms/LeetCode/073 Set Matrix Zeroes.py/Solution.setZeroes_error