G
gcmartijn
Why is this not working ?
bla = 'hondenriem'
print bla[0:4] # correct ! (= hond)
print bla[3:2] # nothing ! (= en)
print bla[6:3] # nothing ! (= riem)
Why don't bla[3:2] and bla[6:3] won't work ?
I use this version:
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on win32
http://docs.python.org/tutorial/introduction.html#strings
word = 'HelpA'
bla = 'hondenriem'
print bla[0:4] # correct ! (= hond)
print bla[3:2] # nothing ! (= en)
print bla[6:3] # nothing ! (= riem)
Why don't bla[3:2] and bla[6:3] won't work ?
I use this version:
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on win32
http://docs.python.org/tutorial/introduction.html#strings
word = 'HelpA'
'lp'word[4] 'A'
word[0:2] 'He'
word[2:4]