python learning nine (list method) Notes

1.append () added to the end of the list of new elements
Here Insert Picture Description
2.extend () is added at the end of disposable another plurality of values in the list
Here Insert Picture Description
3.Insert (a, b) adding a standard element b at the lower, does not cover the original data, the original data back extended
Here Insert Picture Description
4.pop (x) Removes the element at the index specified in the list, the last element is removed by default, and returns the deleted data. Parameter x represents subscript default x = list [-1], represents the last indexing of list
Here Insert Picture Description
5.remove () remove an element in the list of matching results
Here Insert Picture Description
6.clear () to clear the list of all data
Here Insert Picture Description
7.index () to find the value of an index value of the first match from the list
Here Insert Picture Description
8.len () to determine the number of elements in the list
Here Insert Picture Description
9.max () Gets a list of maximum
Here Insert Picture Description
10.min () Get a list of the minimum value
Here Insert Picture Description
11.count () Check the number of elements in the list appear
Here Insert Picture Description
12.reverse () reverse
Here Insert Picture Description
13.sort () (ascending)
Here Insert Picture Description
14.list () will turn into a list of tuples
Here Insert Picture Description

Guess you like

Origin blog.csdn.net/weixin_38324954/article/details/94384981