(test) ? a:b
Ben Finney
ben+python at benfinney.id.au
Sat Oct 25 21:10:43 EDT 2014
More information about the Python-list mailing list
Sat Oct 25 21:10:43 EDT 2014
- Previous message (by thread): (test) ? a:b
- Next message (by thread): (test) ? a:b
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ben Finney <ben+python at benfinney.id.au> writes: > This is short and clear and needs no leaking of the underlying bool > implementation:: > > len(True for line in lines if line.strip()) Correction:: len([True for line in lines if line.strip()]) -- \ “Our task must be to free ourselves from our prison by widening | `\ our circle of compassion to embrace all humanity and the whole | _o__) of nature in its beauty.” —Albert Einstein | Ben Finney
- Previous message (by thread): (test) ? a:b
- Next message (by thread): (test) ? a:b
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list