i want to use only list compression to get solution like the way you see i share solutions. Basically one line solution .
________________________________ From: Gora Mohanty <g...@mimirtech.com> To: Bangalore Python Users Group - India <bangpypers@python.org> Sent: Wednesday, 9 January 2013 1:20 PM Subject: Re: [BangPypers] List compression imrpovement On 9 January 2013 13:11, vijay <vnbang2...@yahoo.com> wrote: > Hi, > 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) It would help if you defined what you mean by "list compression" in this case. It is not immediately obvious what you are trying to achieve. Regards, Gora _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers