KnowledgeBoat Logo

Computer Science

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

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

Python String Manipulation

15 Likes

Answer

s[:3]

Answered By

4 Likes


Related Questions