Source Code:
(back to article)
fruits = ['apple', 'banana', 'mango'] # Append an item to the list fruits.append('orange') print(fruits) # ['apple', 'banana', 'mango', 'orange'] # Extend the list with another list fruits.extend(['strawberry', 'kiwi']) print(fruits) # ['apple', 'banana', 'mango', 'orange', 'strawberry', 'kiwi']
Result:
Report an issue