output of
L1 = [1,2,3,4,5,6,7,8,9,10]
delL1[3:]
Answers
Answered by
1
Required Answer:-
Correct Códe:
L1 = [1,2,3,4,5,6,7,8,9,10]
del L1[3:]
To Find:
- The new list after modification.
Solution:
Given List,
>> L1 = [1,2,3,4,5,6,7,8,9,10]
→ del L1[3:] removes all the elements in the index range - 3 to 9 (last index is 9)
So, the newly modified list is -
>> L1 = [1,2,3]
Note that index value starts with zero. So, index value of 4 in the list is 3 and that of 10 is 9.
For verification, check out the attachment.
•••♪
Attachments:
![](https://hi-static.z-dn.net/files/d77/c317a6a23defa78c86b7e61a0b0fed1b.jpg)
Similar questions
Math,
2 months ago
Social Sciences,
2 months ago
Math,
2 months ago
Science,
4 months ago
Social Sciences,
4 months ago
CBSE BOARD X,
11 months ago
English,
11 months ago