CBSE Class 11 Informatics Practices
Question 50 of 80
Lists in Python — Question 13
Back to all questions[1, 2, 3]
In the given code, myList is initialized as [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]. The del myList[3:] statement deletes all elements in the list starting from index 3 to the end. This modifies myList to only contain the elements from index 0 to 2. The subsequent print(myList) statement then outputs the modified list [1, 2, 3].