हिंदी

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

Advertisements
Advertisements

प्रश्न

What will be the output of the following Python code?

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

विकल्प

  • lSf

  • Stkl

  • StKi

  • l

MCQ
Advertisements

उत्तर

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
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2025-2026 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×