[BangPypers] List compression imrpovement
Guruprasad
lgp171188 at gmail.com
Wed Jan 9 08:59:35 CET 2013
Hi Vijay,
On Wed, Jan 9, 2013 at 1:25 PM, vijay <vnbang2003 at yahoo.com> wrote:
> i want to use only list compression to get solution like the way you see i share solutions.
> Basically one line solution .
I think you are referring to list comprehension here.
>> I want to know if there is any other better way for improving below list compression. I have to use list compression only to achieve it.
>>
>> say i have list a=[1, 4, 9, 12, 15, 21] expected result (4, 12), (9, 12, 15, 21)
Can you explain the logic applied to get the result from the input?
Thanks & Regards,
Guruprasad
More information about the BangPypers
mailing list