Python3 program for the above approach
row = 6 NEW_LINE col = 7 NEW_LINE vis = [ [ 0 for i in range ( col + 1 ) ] for j in range ( row + 1 ) ] NEW_LINE id = 0 NEW_LINE diameter = 0 NEW_LINE length = 0 NEW_LINE