Answers for "extend list in python 3"

0

Python list extend() Method

fruits = ['apple', 'banana', 'cherry']


    cars = ['Ford', 'BMW', 'Volvo']


    fruits.extend(cars)
Posted by: Guest on June-11-2021
-1

what is the use of extend in python

The extend() method adds the specified list elements (or any iterable) to the end of the current list.
Posted by: Guest on November-09-2020

Python Answers by Framework

Browse Popular Code Answers by Language