I start python programming new and I have write this code
y=[[-1,-2,4,-3,5],[2,1,-6],[-7,-8,0],[-5,0,-1]]
for row in y:
for col in row:
if col<0:
row.remove(col)
print(y)
In this code I want to remove elements that have negative value, but when two negative value is together the code does not delete or remove the second value, what can I do? please help me.