Also available at

Also available at my website http://tosh.me/ and on Twitter @toshafanasiev

Friday, 10 September 2010

Python slice operator

I've no doubt that this is in the Python docs ( http://docs.python.org/ ) somewhere ...

Python's slice operator for sequence-like objects is invariant as follows:


s[:n] + s[n:] == s


where s is a sequence and n is in the range [ 0, len(s) )

No comments:

Post a comment