a = [1, 2]
b = [[5,6], [7,8]]
c = list(zip(a, b))
print("c zipped:", c)
i = 0
lenghta = len(a)
c = []
while i < lengtha:
temp_list = [a[i], b[i]]
c.append(temp_list)
i += 1
print("c: ", c)
output:
c zipped: [(1, [5, 6]), (2, [7, 8])] c: [[1, [5, 6]], [2, [7, 8]]]
What I am expecting is:
[[1, 5, 6], [2, 7, 8]]