demo_ref_list_extend.py:
fruits = ['apple', 'banana', 'cherry'] cars = ['Ford', 'BMW', 'Volvo'] fruits.extend(cars) print(fruits)
C:\Users\My Name>python demo_list_extend.py
['apple', 'banana', 'cherry', 'Ford', 'BMW', 'Volvo']