list1 = [[],[],[]]
list2 = [[1,2,3],[4,5,6],[7,8,9]]
i = 0
j = 0
k = 0
while i < len(list1):
list1[i].append(list2[j][k])
i += 1
k += 1
I want my output for list1 to be [[1,4,7],[2,5,8],[3,6,9]]. The problem is I don't know how to advance through the lists in list2. Can you help me out?