[BangPypers] List compression imrpovement
gora at mimirtech.com
Wed Jan 9 09:03:14 CET 2013
On 9 January 2013 13:25, 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 .
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, a], [a] + a[3:]]
More information about the BangPypers