Number Type : Define variable is not quoted, and the quotation marks will be treated as a string
also includes int (shaping ) range from 2147483648 to 2147482647
Long , if you force a shape to be a long integer, you can add an L or L at the end when you define a variable.
float (float type) with decimal
complex (plural type) when defined at the back of the number with J, often used in parabolic
To see the type of data you can use the Tpye () function
string Type (str): the definition of the quotation marks, double quotation marks can be single quotation marks, generally no difference. The outermost quotation mark (or single quotation mark) should be used only if there is a single quotation mark (or double quotation mark) in the middle of the defined string.
if you want to wrap a line in a defined string, add \ n to the place where you want to wrap it
Sanchong Quotes: that is, to start three quotes, ending three quotes, in Sanchong quotation marks can be more intuitive do not need to use line breaks, where you want to wrap the line can be, because the triple quotes are automatically added \ n after wrapping, so you can more intuitively define the line break.
Slices in a string:
Each character in a string has an index, the first one is 0, the second is 1, .... And so on, when a negative number is from the back forward
Operation mode:
str[0,1,...] The character that can be taken out of the corresponding index number
Str[1:] To remove the character from index 1 to the last character
Str[:6] To remove the character from index 0 to the fifth character
STR[::1] Defines a step value of 1, if the No step value defaults to 1, when a negative number indicates a right-to-left
str[::] or str[:] Remove all characters
Python Learning Note 4-data type-numbers