Answer to Question #290750 in Python for Ajay Baburaj

Question #290750

Getting error in this line of code



new_matrix[k][j] = 0




Please help!

1
Expert's answer
2022-01-26T06:57:33-0500
new_matrix = [[1,2,3], [4,5,6], [7,8,9]]
new_matrix[1][0] = 0
new_matrix

Out[11]:

[[1, 2, 3], [0, 5, 6], [7, 8, 9]]
# As you can see, the code works

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS