culpritNr1 <ig2ar-s...@yahoo.co.uk> writes:
> Anyway. More than counting, I am interested in list subsetting in a simple
> way. Forget about counting. Say I have a list of lists and I want to pull
> only the rows where the second "column" equals 3.14.

list_of_lists = [[1.414,2.718,3.14],[4.00,3.14,1.618],[72,29,39]]
those_rows = [xs for xs in list_of_lists if xs[1] == 3.14]
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to