```
columTemp = []
row = len(matrix)
colum = len(matrix[0])
for i in range(row) :
for j in range(colum) :
if matrix[i][j] == 0 :
rowTemp.append(i)
columTemp.append(j)
for i, val in enumerate(rowTemp) :
for j in range(colum) :
matrix[val][j] = 0
for i, val in enumerate(columTemp) :
for j in range(row) :
matrix[j][val] = 0
```