def transpose(a): 
    """
    Returns the matrix transpose of 'a'.

    :param a: The original matrix.
    :return: the transposed matrix. 

    """
    result = [[0] * len(a) for x in range(len(a[0]))] 
    for a_row in range(len(a)):
        for a_col in range(len(a[a_row])):
            result[a_col][a_row] = a[a_row][a_col]
    return result