a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
For this 2D list, when I use a[:,1] to select the elements of the second column, it gives the following error:
TypeError: list indices must be integers or slices, not tuple
How to select the elements of any column of a 2D list?