[Tutor] what's a concise way to print the first elements in a nested list

Vincent Wan wan at walrus.us
Wed Jan 12 23:37:34 CET 2005


If I have a list stuff = [[0,sdfsd,wrtew], [1, rht,erterg]] whats the  
most concise way to print the first elements:

[0, 1]

if tried    print stuff[:][0]  but that just prints the whole list.

Vincent

------------------------------------------------------------------------ 
--------------
PhD Candidate
Committee on the Conceptual and Historical Studies of Science
University of Chicago

PO Box 73727
Fairbanks, AK 99707

wan AT walrus DOT us (change CAPS to @ and . )



More information about the Tutor mailing list