Compute sum for current cell index
for j in range ( 0 , R ) : NEW_LINE INDENT for k in range ( 0 , C ) : NEW_LINE INDENT if j != r and k != c : NEW_LINE INDENT Sum += mat [ j ] [ k ] NEW_LINE DEDENT DEDENT DEDENT print ( Sum ) NEW_LINE