1. List, meta-ancestor, string conversion
List (x): X can be a list or a tuple, with the result of converting X to a list, each character of x within an element in the list.
Example: x= ' zj h '; x=list (x), then x=[' Z ', ' j ', ', ' H '];
Tuple (x), convert x to Ganso, str (x), convert x to String, use ibid.
2. Some methods.
Len (x), which returns the length of x;
Max (x), which returns the maximum value in the parameter x (the numeric value, which supports negative numbers).
Min (x), which returns the minimum value in X.
Note: If x is a list, which includes numbers and letters, it will be an error. Because at the time of comparison, the data types should be the same on both sides of the comparison operator.
SUM (X[,y]), which returns the sum of all the elements in the sequence x plus y, where the y parameter is optional and x is not a string.
Sorted (x), the x is sorted;
Reversed (x), returns a reversal that is not X, and the list (reversed (x)) returns the flip of X.
List (enumerate (x)), Example: x= (A/N), the return value after use is [(0,1), (up to), (2,3)];
List (Zip (x, y)), Example: x= (1,2,3,4,4), y= (4,5,6), after use results for [(1,4), (2,5), (3,6)];
Note: All of the above methods are based on the sequence and are manipulated using iterations.
That is, regardless of whether the object is a list, a meta-ancestor, or a string, using the above method to operate the room, they are split into a single element, the results are in the form of a list.
In particular, the string does not support the sum method.
Str= ' ZJHXXR '
>>> Str
' ZJHXXR '
>>> list (reversed (str))
[' R ', ' X ', ' x ', ' H ', ' J ', ' Z ']
>>> Sorted (str)
[' H ', ' J ', ' R ', ' X ', ' x ', ' Z ']
>>> sum (x), error.
Python learns the concept of 5--sequences