```
class Solution(object):
def setZeroes(self, matrix):
"""
:type matrix: List[List[int]]
:rtype: void Do not return anything, modify matrix in-place instead.
"""
cols = set()
set_row = False
for r in range(len(matrix)):
row = matrix[r]
for i in range(len(row)):
if row[i] == 0:
set_row = True
cols.add(i)
if set_row:
matrix[r] = map(lambda x: 0, row)
set_row = False
for row in matrix:
for i in cols:
row[i] = 0
```