filmov
tv
List Methods Extend POP and Remove Python | Python List Methods

Показать описание
Python List Methods
Python List extend()
In this tutorial, we will learn about the Python List extend() method with the help of examples.
The extend() method adds all the elements of an iterable (list, tuple, string etc.) to the end of the list.
Syntax of List extend()
The syntax of the extend() method is:
Here, all the elements of iterable are added to the end of list1.
extend() Parameters
As mentioned, the extend() method takes an iterable such as list, tuple, string etc.
Return Value from extend()
The extend() method modifies the original list. It doesn't return any value.
Python List extend()
In this tutorial, we will learn about the Python List extend() method with the help of examples.
The extend() method adds all the elements of an iterable (list, tuple, string etc.) to the end of the list.
Syntax of List extend()
The syntax of the extend() method is:
Here, all the elements of iterable are added to the end of list1.
extend() Parameters
As mentioned, the extend() method takes an iterable such as list, tuple, string etc.
Return Value from extend()
The extend() method modifies the original list. It doesn't return any value.