1. How to run the program in Python:
1. Shell mode
2. Create a. py file in the IDE and execute it in the shell using the interpreter
In general, the code snippet is relatively short when the shell approach is preferred, if the code segment is longer, the preferred file method.
Use Python (x, y) for the execution environment where the shell can have file execution.
2, Python (x, y), is a Python-based scientific computing software package. Python is a very popular scientific computing language, taking into account writing efficiency and execution efficiency. There are a lot of similar packages. The main advantage of Python is that it contains a very rich library of functions, documentation, and integration environments, and is a great choice for scientific computing, data processing and analysis, and GUI development.
The modules that are already installed in About:python (x, y).
Documentation: see some of the relevant documents.
Spider: A visual tool that supports both SHLL and file execution, both in Python (x, y) under the same environment, easy to use, and can be interacted with.
3, input, output
Output statement Print:print variable/print string
Input statement raw_input:raw_input ("Tips")
4. Python style
#号开头的行注释
Line continuation: \
If you do not need to continue the line character:
1, parentheses, brackets, curly braces can be written in multiple lines
2, three quotation marks include the following string can also be wrapped in writing
Both systems can determine a continuous relationship, so you can not add a newline character.
A line of multiple statements. It is not common to write multiple statements on one line unless there is a very close connection between the several statements.
Indent.
"Playing with Python data" learning notes