Source Code:
(back to article)
import array as arr # create an array of integers my_array = arr.array('i', [1, 2, 3, 4, 5]) # remove an element from the array my_array.remove(3) # print the updated array print(my_array) # Output: array('i', [1, 2, 4, 5])
Result:
Report an issue