[BangPypers] List compression imrpovement

ragsagar ragsagar at gmail.com
Wed Jan 9 09:17:16 CET 2013

On Wed, Jan 9, 2013 at 1:11 PM, vijay <vnbang2003 at yahoo.com> wrote:

> 2) [y for y in a if bool(y%2==0)],[y for y in a if bool(y%3==0)]

You don't have to do if bool(y%2==0), just if y % 2 == 0 is enough.

blog : ragsagar.wordpress.com
mail id : python -c "print '@'.join(['ragsagar','.'.join([x for x in

More information about the BangPypers mailing list