Qus'python' expression से 'yth' प्राप्त करने के लिए कौन-सी slicing expression सही है?
A. s[1:4]
B. s[1:3]
C. s[2:5]
D. s[1:5:2]
Solution
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 शामिल नहीं होता।