Reference Blog: http://www.cnblogs.com/QG-whz/p/4782809.html
1. Whether variable
Tuples: defined with () or tuple functions, immutable (values of elements and entire tuples);
List: defined with [] or list function, variable.
2. Summary of Operation Methods
List: Python sequence operations are all common, such as indexing, sharding, joins, multiplication, and so on. And because the list is modifiable, there are several ways to assign elements, delete elements, and assign values to shards.
Summary of List (object) methods:
APPEND: to append a new element to the end of the list
count: Used to count a Occurrences of elements in a list
Extend: Append multiple values from another sequence at the end of the list
& nbsp Index: Used to find a value from a list the index position of the first match
insert: Used to insert an object in the corresponding position in a list
Pop: This method pops an element from the list, which is the last one by default. and returns the popup element
Remove: Removes the first occurrence of a value from the list. Unlike pop, the method does not return an element that is removed.
Reverse: This method stores the sequence direction; Note that the method changes the list but does not return a value.
If you need to reverse iterate over a sequence, you can use the reversed Function. Instead of returning a list, this function returns an iterator object that you can use to convert the iterator object to a list:
sort: Used for sorting in the original location list. The original location means that the list will be modified.
sorted reversed
Tuples: There are fewer operations than lists, such as attend, insert, and more. Other operations, such as shards, index operations, and so on, are similar to lists. Therefore, in the use of tuples, always remember that tuples are not modifiable, and naturally know what the tuple has to do.
Python Learning Summary 3: Summary of Operations for tuples and lists