What is the output of print([1, 2, 3, 4, 5][1:4])?
Show answerHide answer
Correct answer: (D) [2, 3, 4]
Explanation
Slicing includes the start index and excludes the end index.
Correct answer: (D) [2, 3, 4]
Explanation
Slicing includes the start index and excludes the end index.
This is question 142 of DSSSB TGT Computer Science Full Mock Test 2. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.