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