I'm trying to make a nested list using data from other lists. I want to make a list where the n items from other lists are at n position in the outer list.
red = [1, 2, 3]
green = [4, 5, 6]
blue = [7, 8, 9]
What I tried doing:
index= []
[index.append(n)for n in (red, green, blue)]
print(index)
What I got:
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
What I want:
[[1, 4, 7], [2, 5, 8], [3, 6, 9]]