newbie string question

Don Low mt at open2web.com
Thu Jun 20 22:45:49 EDT 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