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.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to