On Tue, 16 Dec 2008 13:35:27 +0000
"Barak, Ron" <ron.ba...@lsi.com> wrote:
> Can any one explain why the following string slice works only for the first 
> character, but not for any other ?

I think that you need to reread the docs on slices.

> print "|"+data[0:1]+"|"
> print "|"+data[1:1]+"|"

If you want the second character use "data[1:2]".

-- 
D'Arcy J.M. Cain <da...@druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to