It was running all right on my PC, but OJ says: Runtime error: Line 24: IndexError: list index out of range. Please help me find out what's wrong? Thanks in advance!!

```
def setZeroes(self, matrix):
if len(matrix) == 0:
return None
if len(matrix[0]) == 0:
return None
Rowzerohaszero = False
Colzerohaszero = False
for j in range(len(matrix[0])):
if matrix[0][j] == 0:
Rowzerohaszero = True
break
for i in range (len(matrix)):
if matrix[i][0] == 0:
Colzerohaszero = True
break
for i in range(1,len(matrix)):
for j in range(1,len(matrix[0])):
if matrix[i][j] == 0:
matrix[i][0] = 0
matrix[0][j] = 0
for i in range(1,len(matrix)):
for j in range(1,len(matrix[0])):
if matrix[i][0] == 0 and matrix[0][j] == 0:
matrix[i][j] = 0
#print i,j
if Rowzerohaszero:
for j in range(len(matrix[0])):
matrix[0][i] = 0
if Colzerohaszero:
for i in range (len(matrix)):
matrix[i][0] = 0
```