Question PRG-PY-0068
HardWhat is the output of this program?
s = "Python"
print(s[-1::-2], s[1:5:2], s[10:], s[::-1][:3])
- A.
nhy yh None noh
- B.
nhy yh noh
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Python question
What is the output of this program?
s = "Python"
print(s[-1::-2], s[1:5:2], s[10:], s[::-1][:3])
nhy yh None noh
nhy yh noh
Sign up free to see the answer and a step-by-step explanation.
yhn yh noh
nhy th noh