I have a lists of lists:
lst = [
[1,2,3],
[1,2,3],
[1,2,3]
]
How would I be able to add each column of the list to an empty list.
By column I mean, lst[i][column]
, e.g. 1,1,1
then 2,2,2
, etc. and get a new list like this:
[1,1,1,2,2,2,3,3,3]
So far I have tried:
pos = 0
column = 0
row = 0
i = 0
empty = []
while i < len(lst):
empty.append(lst[i][0])
i += 1
print(empty)