newbie string question

Don Low mt at open2web.com
Fri Jun 21 04:45:49 CEST 2002


There's probably a very simple explanation, but I can't see it for now, so
bear with me.

>>>pystr = 'Python'
>>>pystr = [5]
'n'
>>>pystr [2:5]
'tho'

The question is, why isn't pystr [2:5] 'thon' instead of 'tho'. Could
somebody explain?

-- 
Thanks,

Mark



More information about the Python-list mailing list