Explanation:Execute in shell to verify. 2. To retrieve the character at index 3 from string s=”Hello” what command do we execute (multiple answers allowed) ?
A. s[3]
B. s.getitem(3)
C. s.__getitem__(3)
D. s.getItem(3)
Answer:A
Explanation:Execute in shell to verify. 2. To retrieve the character at index 3 from string s=”Hello” what command do we execute (multiple answers allowed) ?
A. s[3] B. s.getitem(3) C. s.__getitem__(3) D. s.getItem(3)
Explanation:__getitem(..) can be used to get character at index specified as parameter. 3. To return the length of string s what command do we execute (multiple answers allowed) ?