Course
Simulator
More
Premium
Log in
Python Function Reference
Functions
extend
extend
Extend the list by appending all the items from the iterable.
Python 3.13
list
.
extend
(
iterable
)
Examples
Python 3.13
>>
>
a
=
[
1
,
2
]
>>
>
a
.
extend
(
[
3
,
4
]
)
[
1
,
2
,
3
,
4
]