NIELIT O Level Exam

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 सही है?

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 शामिल नहीं होता।
Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad