← Quiz: Python Strings: all 15 questions
Quiz: Python Strings · Question 4 of 15
What is "python"[-3:]?
What is "python"[-3:]?
- A."hon"
- B."pyt"
- C."noh"
- D."tho"
Answer & explanation
Correct answer: "hon"
-3 is the third character from the end; slicing to the end gives "hon".
Can you get the rest right without peeking?
Take the timed Quiz: Python Strings quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →