0
Why it's not complete (list python), help me pliss
Write a program that takes an input string and outputs the 3rd character of the string. My code: Word = input() Print(word[3]) It's just work for 1 chase, please help me
4 Answers
+ 4
To print the 3rd character of the string, you should print index 2 i.e print(word[2]) because index of python list starts from 0.
a b c d e ...
0 1 2 3 4 ....
So the third character 'c' has index 2.
similarly, a, b, d, and e has indices 0, 1, 3, and 4 respectively..
+ 2
In your code print(word[3]) prints 4th character of the string
+ 2
Ok, Delicate Cat thx for sharing
+ 1
Thx bro I forgot about it