Python contains the following functions:
Serial Number |
function |
1 |
CMP (List1, List2) Compare two elements of a list |
2 |
Len (list) Number of list elements |
3 |
Max (list) Returns the maximum value of a list element |
4 |
MIN (list) Returns the minimum value of a list element |
5 |
List (seq) Convert a tuple to a list |
Python contains the following methods:
Serial Number |
Method |
1 |
List.append (obj) Add a new object at the end of the list |
2 |
List.count (obj) Count the number of occurrences of an element in a list |
3 |
List.extend (seq) Append multiple values from another sequence at the end of the list (extend the original list with a new list) |
4 |
List.index (obj) Find the index position of the first occurrence of a value from the list |
5 |
List.insert (index, obj) Inserting an object into a list |
6 |
List.pop (Obj=list[-1]) Removes an element from the list (the last element by default), and returns the value of the element |
7 |
List.remove (obj) To remove the first occurrence of a value in a list |
8 |
List.reverse () Reverse List of elements |
9 |
List.sort ([func]) Sort the original list |
Python list Functions & methods