I've got a sort of array in python, and i'm looking to subtract one from each int in all of it. for example:
arr = [[2,3,4],
[5,6,7],
[8,9,10]]
#this should become this:
arr = [[1,2,3],
[4,5,6],
[7,8,9]]
there's a few ways i've tried to do this
for i in arr:
for j in i:
j-=1 #doesn't work!
I'm aware it would be easier to do this with numpy, but this is for a large project that i'm working on, so implementing numpy would take hours, if not more. Thanks!