from typing import List
from typing import Tuple


def swap_rows(matrix: List[List[float]], rows: Tuple[int, int]) -> List[List[float]]:
    """
    Mutate matrix by swapping rows[0] and rows[1].

    Preconditions:
     - len(matrix) > 0
     - all(len(row) > 0 for row in matrix)
     - sum([1 for i in range(1, len(matrix)) if len(matrix[i]) != len(matrix[0])]) == 0
     - all([0 <= i < len(matrix) for i in rows])
    """

    temp = matrix[rows[0]]
    matrix[rows[0]] = matrix[rows[1]]
    matrix[rows[1]] = temp
    return matrix