transpose

Transposes a 2D list of rectangles, switching rows and columns.

This method takes a list of lists and rearranges its elements such that the rows become columns and the columns become rows.

Return

A new 2D list of rectangles where rows and columns are swapped.