KnowledgeBoat Logo

Computer Science

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]

Python String Manipulation

17 Likes

Answer

s[-3:]

Answered By

4 Likes


Related Questions