I've created a matrix like this:
b = [[0 for y in range(1,4)] for x in range(1,3)]
I want to have the indexes b[1:2][1:3]
available, but the above code doesn't seem to do that.
range(1,4)
should return numbers from 1 to 3, and range(1,3)
should return numbers 1 and 2.
When i try to assign a value to b[1][3]
, i get an IndexError. What is the explanation of this?