MCQ Answer

Which string slicing expression gives the output 'yth' from 'python'?

Which string slicing expression gives the output 'yth' from 'python'?

'python' expression से 'yth' प्राप्त करने के लिए कौन-सी slicing expression सही है?
Topic : Sequence data types in python

A. s[1:4]

B. s[1:3]

C. s[2:5]

D. s[1:5:2]




Correct Answer is :

A. s[1:4]



Explanation
Index 1 through 3 contains y, t, h; the stop index 4 is excluded.

Index 1, 2 और 3 पर y, t, h हैं और stop index 4 शामिल नहीं होता।
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad