Name

.extend()

Examples
shopping_list = ['carrot', 'cucumber']
fruits = ['mango', 'pear']
print(shopping_list)  # Prints ['carrot', 'cucumber']

shopping_list.extend(fruits)
print(shopping_list)  # Prints ['carrot', 'cucumber', 'mango', 'pear']
Description
Syntax
a.extend(x)
Parameters
a
x
Related .insert()
.pop()
.reverse()
.index()
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License