[BangPypers] List compression imrpovement
Balachandran Sivakumar
benignbala at gmail.com
Wed Jan 9 10:22:07 CET 2013
Hi,
On Wed, Jan 9, 2013 at 2:44 PM, vijay <vnbang2003 at yahoo.com> wrote:
> Yes problem statement is correct.
> I wanted it to be one line solution so i used list compression.
> If there is other way to do it in one line other then list compression that should be fine , but need one line answer for this.
>
It is list *comprehension* not *compression*. Though one
liners are a lot of fun, and serves as a way to learn idiomatic code,
please note that readability is lost to a considerable extent with one
liners. So, use them judiciously, i.e. when what is being done is
obvious. Thanks
--
Thank you
Balachandran Sivakumar
Arise Awake and stop not till the goal is reached.
- Swami Vivekananda
Mail: benignbala at gmail.com
Blog: http://benignbala.wordpress.com/
More information about the BangPypers
mailing list