Python Remove Array Item
Removing Array Elements
You can use the pop()
method to remove an element from the array.
ExampleGet your own Python Server
Delete the second element of the cars
array:
cars.pop(1)
Try it Yourself »
You can also use the remove()
method to remove an element from the array.
Note: The list's remove()
method
only removes the first occurrence of the specified value.