List problem
Thomas Bach
thbach at students.uni-mainz.de
Sun Dec 2 10:59:22 EST 2012
More information about the Python-list mailing list
Sun Dec 2 10:59:22 EST 2012
- Previous message (by thread): List problem
- Next message (by thread): List problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Dec 02, 2012 at 04:16:01PM +0100, Lutz Horn wrote: > > len([x for x in l if x[1] == 'VBD']) > Another way is sum(1 for x in l if x[1] == 'VBD') which saves the list creation. Regards, Thomas.
- Previous message (by thread): List problem
- Next message (by thread): List problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list