Eric Price wrote:
> Hello;
> I'm studying some code examples from the python cookbook site. I came 
> across this:
> 
> def colsplit(l, cols):
>    rows = len(l) / cols
>    if len(l) % cols:
>        rows += 1
>    m = []
>    for i in range(rows):
>        m.append(l[i::rows])
>    return m
> 
> What I'd like to know is what is the double colon? What does it do?
>        m.append(l[i::rows])
> 
> Thanks,
> Eric

http://docs.python.org/tut/tut.html
http://docs.python.org/tut/node5.html#SECTION005140000000000000000
http://docs.python.org/ref/slicings.html

Probably most helpful to you is:

http://developer.mozilla.org/es4/proposals/slice_syntax.html
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to