Python List
We have already seen What List is? and how to write elements in List. To follow that post visit Python Data Types . Where you will get all the different data types available into Python programming. In this blog we will see different methods to work on list, this can be like appending a item to list, removing item from list, How to find length of a list and so on.... What is Method? Method is basically a function which is written for specific object. Syntax: name_of_an_object . name_of_the_method example: x = [2,5,3,8,6,9] x.sort ( ) Here you can see x is the object of type 'List' and sort is the method to perform on object. Below given is the list of methods that can be executed on list type of object. We will see each one with an example. list.append(x) Add an item to the end of the list. Equivalent to a[len(a):] = [x]. list.extend(L) Extend the list by appending all the items in the given list. Equivalent to a[len(a):] = L. list.inse...