You have either the list-comprehension the wrong way around, it should be:
length = 13
breadth = 24
sheet = [ [ 0 for x in range( breadth ) ] for y in range( length ) ]
sheet[length-2][breadth-3] = 1
Or you have the indexing of the sheet list the wrong way around, it should be:
length = 13
breadth = 24
sheet = [ [ 0 for x in range( length ) ] for y in range( breadth ) ]
sheet[breadth-2][length-3] = 1
Both corrections will work fine, but it depends on what you are defining breadth and width to be.
In the first example, the list looks like:
#breadth --->
[[0,0 .... 0,0], #width |
... # |
[0,0 .... 0,0], # \/
]
there are width rows of size breadth
In the second:
#width --->
[[0,0 .... 0,0], #breadth |
... # |
[0,0 .... 0,0], # \/
]
there are breadth rows of size width
listobjects, not arrays.sheet, there arebreadthmany elements. When you index into one of the sublists insheet, there arelengthmany elements.