I have the following nested list:
grid = [[a, b, c, d, e],
[f, g, h, i, j],
[k, l, m, o, p]]
And in a for loop, I want to take the nth element of each sublist and append it to a single, 1-dimension list. So at the first iteration, it'll look like this:
[a, f, k]
and the next iteration, it'll look like this:
[b, g, l]
and so on.
I want to do this just because I want to create this list to another existing, constant list. The following is my attempt but what it does is that it only creates a vertical list of the last element of each sublist:
for j in range(0, len(grid)):
column_list = [item[j] for item in grid]