1. Single-quote strings and escape quotes
Single and double quotation marks do not make much difference, and a backslash (\) can be used to escape the quotation marks in a string for the special symbol that appears.
2. Stitching strings
3. String representation, str and repr (two mechanisms for converting a value to a string)
3.1, Str converts the value into a reasonable form of the string for the user to understand;
3.2. Repr creates a string that represents a value in the form of a valid Python expression, repr (x) can be represented by ' X ' (single quotes), but is no longer used in pyhton3.0, so it is recommended to use REPR
4. Comparison of input and raw_input
The 4.1 input function assumes that the user entered a valid Python expression, and if the user enters a string, it must be quoted
The 4.2 raw_input function will take all the input as the original data, and then put it into the string, so if you enter a number then use input, otherwise you should use the Raw_input
5. Long strings, raw strings, and Unicode
5.1 Long strings, use three quotation marks "" or "" "for strings that span multiple lines
5.2 Original string, string starting with R, each character entered in the original string will be consistent with the way it is written
Ordinary strings in 5.3 Python are stored internally in 8-bit ASCII format, while Unicode strings are stored as 16-bit Unicode characters, which can represent more character sets, such as Chinese
Python string handling