🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Python Strings: all 15 questions

Quiz: Python Strings · Question 13 of 15

What does this print? (code)

What does this print?

s = "Skills101"
print(s[::2])
  1. A.Sil11
  2. B.Skills
  3. C.kls0
  4. D.S1
Answer & explanation

Correct answer: Sil11

A step of 2 takes every second character: S, i, l, 1, 1.

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 →