def transpose_table(table):
if len(table) == <NUM_LIT:0>:<EOL><INDENT>return table<EOL><DEDENT>else:<EOL><INDENT>num_columns = len(table[<NUM_LIT:0>])<EOL>return [[row[i] for row in table] for i in range(num_columns)]<EOL><DEDENT>
Transposes a table, turning rows into columns.
:param table: A 2D string grid.
:type table: [[``str``]]

:return: The same table, with rows and columns flipped.
:rtype: [[``str``]]