Lets say I have this List of Lists:
x=[['0', '0', '0', '0', '0', '0'],
['0', '0', '0', '0', '0', '0'],
['0', '0', '0', '0', '0', '0'],
['0', '0', '0', '0', '0', '0']]
now I get the input of
(2,2), (5,4)) (second coordinate represents last pixel where no "1" should be)
which results in
x=[['0', '0', '0', '0', '0', '0'],
['0', '0', '0', '0', '0', '0'],
['0', '0', '1', '1', '1', '0'],
['0', '0', '1', '1', '1', '0']]
for index,i in enumerate(x[3][2:4]):
i ="1"
I dont know why this doesn't work for the first line...
any ideas how I could make the rectangle in one go are also welcome :) thanks in advance
(0,0), (1,1)
should give
x=[['1', '0', '0', '0', '0', '0'],
['0', '0', '0', '0', '0', '0'],
['0', '0', '0', '0', '0', '0'],
['0', '0', '0', '0', '0', '0']]