One: Print statement
Print statements can be printed out. Where the concatenation of strings is used instead of +, which is different from Java.
print ' Hello ', ' world '--printing Hello World
Two: Notes
Python is annotated with #, such as: #print ' Hello ';
Three: Variables
In Python, the equals sign = is an assignment statement that assigns any data type to a variable, the same variable can be repeatedly assigned, and can be a variable of different types.
Python, like JS, is dynamic. The type of a variable is determined by its value, not when it is compiled.
Four: string
Analogous to JS, strings can be represented by "or".
If the string contains single quotation marks, the string is represented in double quotation marks, enclosed in single quotation marks if the string contains double quotation marks, or escaped with \ If both are available.
Multiline string: Python provides three quotation marks, strings in three quotation marks can be written in a newline, and printed in a newline.
Raw string: Use R to modify the string, equivalent to the string contains the quotation marks, special symbols, such as the need to explicitly escape the \ to extract out.
Python Learning Notes