English

What will be the output of the following Python code? str= "Soft Skills" print(str[-3::-3]) - Computer Science (Python)

Advertisements
Advertisements

Question

What will be the output of the following Python code?

str= "Soft Skills"
print(str[-3::-3])

Options

  • lSf

  • Stkl

  • StKi

  • l

MCQ
Advertisements

Solution

lSf

Explanation:

str[-3::-3] starts from the 3rd last character 'l' and moves left in steps of 3.
It picks 'l', 'S', and 'f', giving the output lSf.

shaalaa.com
  Is there an error in this question or solution?
2025-2026 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×