Online Exam Quiz
Menu mobile
Home
GK Today
Subject
CCC Online Test
O Level Online Test
Coding
Report Bug
Qus: <p>What does the following slice return?</p><pre><span style="font-size: 14px;">s = [0,1,2,3,4,5]<br></span><span style="font-size: 14px;">print(s[1:5:2])</span></pre>
Qus<p>निम्न slice का result क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">s = [0,1,2,3,4,5]<br></span><span style="font-size: 14px;">print(s[1:5:2])</span></pre>
A. [1, 3]
B. [2, 4]
C. [1, 2, 3, 4]
D. [0, 2, 4]
Solution
A. [1, 3]
Explanation
<p><span style="font-size: 14px;">It starts at index 1, stops before index 5 and moves with step 2.</span></p><p><span style="font-size: 14px;"><br></span></p><p><span style="font-size: 14px;"><br></span></p><p><span style="font-size: 14px;">Slice index 1 से शुरू होती है, index 5 से पहले रुकती है और step 2 लेती है; इसलिए [1,3] मिलता है।</span></p>
Latest Current Affairs 2026
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test , CCC MCQ
Python Coding Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
O Level NIELIT Study material and Quiz
Website development Company in Allahabad