[Solved] Creating a List of like Indicies [closed]


I think you need empty list so you can append the numbers to that i.e

FirstNumbers = [1, 2, 3]
SecondNumbers = [4, 5, 6]
ThirdNumbers = [7, 8, 9]
NestedNumbers = [FirstNumbers, SecondNumbers, ThirdNumbers]
m = []
for i in range(0, 3):
    k = []
    for each_number in NestedNumbers:
        k.append(each_number[i])
    m.append(k)

Output m : [[1, 4, 7], [2, 5, 8], [3, 6, 9]]

1

solved Creating a List of like Indicies [closed]