How to Modify Value of Specified Array Item in Python


In this example we will show how to modify the value of the specified array item in Python.

Source Code

letter = ['a', 'b', 'c', 'd']
print(letter)
letter[1] = 'e'
print(letter)

Output:

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