Q. Given a list L1 = [3, 4.5, 12, 25.7, [2, 1, 0, 5], 88] which function can change the list to:
(a) [3, 4.5, 12, 25.7, 88]
(b) [3, 4.5, 12, 25.7]
(c) [[2, 1, 0, 5], 88]
Answer =
(a)
>>> L1.pop (4)
Or
>>> del L1 [4]
(b)
>>> del L1 [4:]
(c)
>>> del L1[0:4]
What is the length of the list?
ReplyDeletefor which one.
DeleteQuestion no 5
ReplyDeleteintial length of list is 6.
DeleteThank you
ReplyDeleteWelcome : )
DeleteAre you Sumitha Arora or Mentor????
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )