Number of rows and cols
n = len ( A ) NEW_LINE m = len ( A [ 0 ] ) NEW_LINE row = [ [ 0 for i in range ( m ) ] for i in range ( n ) ] NEW_LINE col = [ [ 0 for i in range ( m ) ] for i in range ( n ) ] NEW_LINE