[Tutor] Accessing Values of specific column in a 2D list or array

Varsha Purohit varsha.purohit at gmail.com
Sun Sep 2 11:13:59 CEST 2007


Hello,
    Suppose i have a 2D list(grid) like

grid = [[1,1,2,7,6,9],\
          [,9,1,1,1,9,1],\
          [8,1,2,0,0,4],\
          [1,4,1,1,8,5]]

how can i access to all the elements of the list from column no. 5.

output should be like [6,9,0,8]...

thanks,-
Varsha Purohit,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070902/dc8e68ec/attachment.htm 


More information about the Tutor mailing list