Rotate matrix 90 degrees
I just want to know if the code I wrote would be appropriate in a interview setting or would I expect to write code like the solution in the book.


As we cannot see the solution form the book, this is hard for us to answer.

Your solution seems to work which is ok for learning purposes, the biggest I can think of with your current code is List comprehension.


for col in the_array:
    transposed.append(col[i])
transposed.reverse()



Could be 

transposed = [col[i] for col in the_array][::-1]


Note how instead of .reverse() I use the slice annotation to reverse the list [::-1]

We could even make the first for loop another list comprehension (essentially creating a double list comprehension)

def transpose2(the_array):
    return [
        [col[i] for col in the_array][::-1]
        for i in range(len(the_array))
    ]


I should note though that is is a rather elaborate way of writing

def transpose3(arr):
    return zip(*arr[::-1])


Where the zip rotates the reversed list with argument unpacking