Computer Science
Which of the following functions will return the first three characters of a string s?
- s[3:]
- s[:3]
- s[-3:]
- s[:-3]
Python String Manipulation
15 Likes
Answer
s[:3]
Answered By
4 Likes
Related Questions
Which of the following functions will return the total number of characters in a string?
Which of the following functions will return the last three characters of a string s?
Which of the following functions will return the string in all caps?
Which of the following functions will return the string with every 'P' replaced with a 'z'?