What is the value of s[-4] and s[4] if the value of s is “Welcome”
Answers
Answered by
1
Answer:
3
Explanation:
please thanks my answer please
Answered by
3
Answer:
s[-4] = 'c'
s[4] = 'o'
Explanation:
In python, s contains string "Welcome" and the value of s[4] will be 'o' as the index of 4 is at 'o' as the index starts from 0 from beginning and the value of s[-4] is 'c' as the negative index starts from last with index number -1.
Similar questions