On 9 January 2013 13:25, vijay <vnbang2...@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 .
Do you mean "list comprehension"? Even so, it is not clear how the resulting list is to be derived from the original. Rather than showing us solutions that already assume a particular way, could you describe the problem in words? Else, the most efficient way to achieve your expected result would be [[a[1], a[3]], [a[2]] + a[3:]] Regards, Gora _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers