The command used to add elements to a list
Answers
Answered by
1
Answer:
Let's look adding element to a list with an example
# fruit list
fruit = ['orange', 'apple', 'banana']
# an element is added
fruit.append('pineapple')
#Updated Fruit List
print('Updated fruit list: ', fruit)
output
Updated fruit list: ['orange', 'apple', 'banana', 'pineapple']
as you see , 'pineapple' element has been added as last element.
Similar questions