Python‎ > ‎list‎ > ‎

list.extend()

http://www.adilwaseem.com/

Definition
Extend list by appending elements from the iterable.

Syntax
L.extend(iterable) -> None

Parameters
iterable

Examples
The method returns as:
 x=["Python","Lake","Learning", "Python"]
y=["33","32","77"]
x.extend(y)
print(x) 

>>> 
['Python', 'Lake', 'Learning', 'Python', '33', '32', '77']
>>>

Comments