# Task
 Given a rectangular `matrix` and integers `a` and `b`, consider the union of the ath row and the bth (both 0-based) column of the `matrix`. Return sum of all elements of that union.

# Example

 For
```
matrix = [[1, 1, 1, 1], 
          [2, 2, 2, 2], 
          [3, 3, 3, 3]]
a = 1 and b = 3 ```
the output should be `12`.

 Here `(2 + 2 + 2 + 2) + (1 + 3) = 12`.

# Input/Output


 - `[input]` 2D integer array `matrix`

    2-dimensional array of integers representing a rectangular matrix.

    Constraints: `1 ≤ matrix.length ≤ 5, 1 ≤ matrix[0].length ≤ 5, 1 ≤ matrix[i][j] ≤ 100.`
    

 - `[input]` integer `a`

  A non-negative integer less than the number of matrix rows.

   Constraints: `0 ≤ a < matrix.length.`
   
   
 - `[input]` integer `b`

   A non-negative integer less than the number of matrix columns.

   Constraints: `0 ≤ b < matrix[i].length. `


 - `[output]` an integer

Difficulty: introductory

Starter code:

def crossing_sum(matrix, row, col):
	

Solutions:
def crossing_sum(matrix, row, col):
    return sum(matrix[row]) + sum(line[col] for line in matrix) - matrix[row][col]

def crossing_sum(a, b, c):
    return sum(a[b]) + sum(x[c] for x in a) - a[b][c]

def crossing_sum(matrix, row, col):
    return sum(matrix[row]) + sum(i[col] for i in matrix[:row] + matrix[row + 1:])

def crossing_sum(matrix, row, col):
    mat_tr = [[i[j]  for i in matrix] for j in range(len(matrix[0]))]
    return sum(matrix[row] + mat_tr[col]) - matrix[row][col]

def crossing_sum(matrix, row, col):
    return sum(matrix[row]) + sum(matrix[i][col] for i in range(len(matrix))) - matrix[row][col]


def crossing_sum(mx, r, c):
    return sum(mx[r]+[x[c] for x in mx[:r]+mx[r+1:]])

crossing_sum=lambda m,r,c: sum(m[r])+sum(l[c] for i,l in enumerate(m) if i!=r)

def crossing_sum(matrix, row, col):
    a = matrix[row]
    b = [i[col] for num,i in enumerate(matrix) if num!=row]
    return sum(a) + sum(b)


def crossing_sum(matrix, row, col):
    return sum(matrix[row]) + sum([matrix[a][col] for a in range(len(matrix)) if a != row])
    # sums the required row
    # sums a list made of the required column minus the value that is in the row