4. Given a list L1 = [3, 4.5, 12, 25.7, [2, 1, 0, 51, 88]
(a) Which list slice will return [12, 25.7, [2, 1, 0, 5]] ?
(b) Which expression will return [2, 1, 0, 5] ?
(d) Which list slice will return [4.5, 25.7, 88] ?
(c) Which list slice will return [[2, 1, 0, 5]] ?
Answers
Answered by
7
L1 = [3, 4.5, 12, 25.7, [2, 1, 0, 51, 88]
(a) L1[2:5]
(B) L1[4:5]
(D) L1[1::2]
Attachments:
Similar questions