barney75
Mechanical
- Jan 22, 2007
- 58
I'm trying to store some data with Python into a two dimensional array and I have some problems with the use of the List object indexes. Let consider for exaple the following list a=[[1,2,3],[4,5,6],[7,8,9]]. Ok, after this command, if you type a[0][0] the result is 1, if you type a[0][:] the result is [1, 2, 3], but if you want all the elements of the first column (i.e. 1, 4, and 7) and you type a[:][0] the result is [1, 2, 3]!!! What is wrong or in other words what should I type to print the elements of the first column?
Thanks for the help
bye
Thanks for the help
bye