How to Remove an Element From Array in Python


In this example, we will learn how to remove an element from the array using the remove() method in Python.

Source Code

letter = ['a', 'b', 'c', 'd']
print(letter)
letter.remove('c')
print(letter)

Output:

['a', 'b', 'c', 'd']
['a', 'b', 'd']
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments