0
What's wrong with this code please?
4 Answers
+ 5
Here. You can see what Louis is saying. Those spaces at the beginning and end of orange will mess the indexes up.
https://code.sololearn.com/cAdyWCQS3BDD/?ref=app
+ 4
there is a space in front of orange.
0 space
1 o
2 r
3 a
4 n
5 g
6 e
7 space
change ' orange ' to 'orange' to get your expected result
+ 2
Output is a because a is the 4th letter of word " orange " (note that spaces count like chars)
+ 1
thank you all so much now i understand