I'm building a basic mapping robot where all the data is stored on a 2D python array. However I am unable to find any way to move entire rows or columns over and then insert a blank row/column in. For example:
['#','0','0']
['0','1','0']
['#','0','0']
if moved to the right to look like :
['0','#','0']
['0','0','1']
['0','#','0']
or
['#','0','#']
['0','1','0']
['0','0','0']
if moved down to look like :
['0','0','0']
['#','0','#']
['0','1','0']
I have already figured out how to expand the array whenever something is detected outside of the pre-defined array however I am unable to move rows and columns like demonstrated above.
Any help would be greatly appreciated. Thanks :)