Source Code:
(back to article)
fruits = ['apple', 'banana', 'cherry'] fruits[1] = 'pear' print(fruits) # ['apple', 'pear', 'cherry']
Result:
Report an issue