1. Sequence member relationship operator (in, not in)
2. Sequence type operators
Sequence operator action
Seq[ind] get the element labeled IND
Seq[ind1:ind2] Gets the set of elements from Ind1 to Ind2
seq * expr sequence repeats expr times
seq1 + seq2 connection sequence seq1 and SEQ2
obj in seq determines if the obj element is contained in a SEQ
obj not in seq determines if the obj element is not included in the SEQ
3. Join operator (+): One sequence is connected to another sequence of the same type.
4. Repeat operator (*)
5. Type conversion
function meaning
List (ITER) converts an iterative object to a table
str (obj) converts the Obj object to a string (the string representation of the object)
Unicode (obj) converts an object to a Unicode string (using the default encoding)
The basestring () abstract Factory function, which simply provides the parent class for STR and Unicode functions, cannot be instantiated or called
A tuple (ITER) converts an iterative object to a tuple object
6. String Formatting symbols
Format Character Conversion mode
%c converted to character (ASCII value, or string of length one)
%ra takes precedence over string conversions with the repr () function
%s takes precedence over string conversion with the STR () function
%d/%i turns into signed decimal number
%ub converted to unsigned decimal number
%ob turns into unsigned octal number
%XB/%XB (Unsigned) turns to unsigned hexadecimal number (x/x represents the size of the converted hexadecimal character
lowercase
%e/%e turns into scientific notation (e/e control output e/e)
%f/%f into floating-point numbers (fractional parts are naturally truncated)
Shorthand for%g/%g%e and%f/%e and%f
% OUTPUT%
7. Built-in function cmp (), Len (), Max (), min (), zip (), enumerate ()
>>> s, t = ' Foa ', ' OBR '
>>> zip (S, t)
[(' F ', ' O '), (' O ', ' B '), (' A ', ' R ')]
8.Python There is no C-style end character nul, you enter how many characters, Len () function return value is how much.
9. Three quotation marks
Triple quotation marks it allows a string to span multiple lines, and the string can contain line breaks, tabs, and other special characters.
10. Function can return multiple objects
Python core programming Four-sequence: string, list, tuple