List Methods Extend POP and Remove Python | Python List Methods
Programming Guru
Python List Methods Python has a lot of list methods that allow us to work with lists. In this reference page, you will find all the list methods to work with Python lists. For example, if you want to add a single item to the end of the list, you can use the list.append() method.
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:
list1.extend(iterable) 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.
Follow my Facebook Page : https://www.facebook.com/105940115222549 Follow me on Instagram : https://www.instagram.com/p/CViUlw2sOMi Follow me on tumblr : http://programming-guru.tumblr.com Follow me on reddit : https://www.reddit.com/u/Programming_guru1?utm_medium=android_app&utm_source=share ... https://www.youtube.com/watch?v=Ht_EN8JHfks
16207733 Bytes