30th Apr 2018, 9:23 PM
Hussam eldin Ahmed
Hussam eldin Ahmed - avatar
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
30th Apr 2018, 9:28 PM
cyk
cyk - avatar
+ 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
30th Apr 2018, 9:28 PM
Louis
Louis - avatar
+ 2
Output is a because a is the 4th letter of word " orange " (note that spaces count like chars)
30th Apr 2018, 9:29 PM
KrOW
KrOW - avatar
+ 1
thank you all so much now i understand
30th Apr 2018, 9:40 PM
Hussam eldin Ahmed
Hussam eldin Ahmed - avatar