Python list.extend() Method
The extend() method adds the specified list elements (or any
iterable) to the end of the current list.
Syntax
list.extend(iterable)
Parameters
| Parameter | Description |
|---|---|
iterable |
Required. Any iterable (list, set, tuple, etc.) |
Return Value
None. The list is modified in place.
Example
Using the extend() method:
Output
Click Run to execute your code
Enjoying these tutorials?