Answers for "python list.extend"

2

list.extend

# languages list
languages = ['French', 'English']

# another list of language
languages1 = ['Spanish', 'Portuguese']

# appending language1 elements to language
languages.extend(languages1)

print('Languages List:', languages)
Posted by: Guest on March-22-2021
3

python extend

fruits = ['apple', 'banana', 'cherry']
cars = ['Ford', 'BMW', 'Volvo']

fruits.extend(cars)

print(fruits)
# ['apple', 'banana', 'cherry', 'Ford', 'BMW', 'Volvo']
Posted by: Guest on April-15-2021
0

Python list extend() Method

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


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


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

Python Answers by Framework

Browse Popular Code Answers by Language