Q.

To retrieve the character at index 3 from string s=”Hello” what command do we execute (multiple answers allowed)?

A. s[]
B. s.getitem(3)
C. s.    getitem    (3)
D. s.getitem(3)
Answer» C. s.    getitem    (3)
Explanation:     getitem(..) can be used to get character at index specified as parameter.
2.4k
0
Do you find this helpful?
12

Discussion

No comments yet