On Sat, 15 Oct 2016 22:23:29 -0700, 380162267qq wrote:

> c="abcdefghijk"
> len=len(c)
> n is a int sb=[[] for i in range(n)]
>     while (i < len) {
>         for (int j = 0; j < n && i < len; j++)
>             sb[j].append(c[i++]);
>         for (int j = n-2; j >= 1 && i < len; j--) //
>             sb[j].append(c[i++]);
>     }
> How to translate to python? I tried but my python code is really stupid

show your python code,
does it at least get the right results
if so you may get better feed back on how to imporve it

also as other has suggested try detailing the actual problem & working on 
that rather than trying to translate an existing solution 

Producers seem to be so prejudiced against actors who've had no training.
And there's no reason for it.  So what if I didn't attend the Royal 
for twelve years?  I'm still a professional trying to be the best actress
I can.  Why doesn't anyone send me the scripts that Faye Dunaway gets?
                -- Farrah Fawcett-Majors

Reply via email to