python transpose list

list_of_lists = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

numpy_array = np.array(list_of_lists)
transpose = numpy_array.T

transpose_list = transpose.tolist()

Here is what the above code is Doing:
1. We create a list of lists.
2. We convert the list of lists into a NumPy array.
3. We use the .T attribute to transpose the NumPy array.
4. We convert the NumPy array back into a list of lists.