CBSE Class 11 Computer Science Question 14 of 91

String Manipulation — Question 4

Back to all questions
4
Question

Question 4

Which of the following functions will return the last three characters of a string s?

  1. s[3:]
  2. s[:3]
  3. s[-3:] ✓
  4. s[:-3]
Answer