[docs] how to using it?

古志磊 guzl86 at qq.com
Tue Oct 5 16:47:31 CEST 2010


“a[i:j, k:l]” in the python 2.5 documentation.

But I don’t know how to using it.

There is a error if I run this codes:

>>> a = "abcdefghigklmn"

>>> a[1:3, 4:7]

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

TypeError: string indices must be integers


Please give me a right code .

Thank you very much.



2010-10-5 22:45:33

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20101005/6a97983a/attachment.html>

More information about the docs mailing list