Computer Science

Given a list L1 = [3, 4.5, 12, 25.7, [2, 1, 0, 5], 88], which function can change the list to:

  1. [3, 4.5, 12, 25.7, 88]
  2. [3, 4.5, 12, 25.7]
  3. [ [2, 1, 0, 5], 88]

Python List Manipulation

23 Likes

Answer

  1. L1.pop(4)
  2. del L1[4:6]
  3. del L1[:4]

Answered By

13 Likes


Related Questions