1. Interactive mode programming
cmd window = = Input Python
= = Enter print "hello,python!"; PS: If it is a new version of Python, you need to enter print ("hello,python!");
= = Output hello,python!
2. Script Mode programming
Invokes the interpreter and script as arguments, starts executing the script, and continues until the script finishes. When the script finishes, the interpreter is no longer active.
Write a simple Python program in the script. All python files have a. py extension. So, the following code is written in the test.py file
test.py file + + edit print "hello,python!";
cmd window = input python file path \test.py
3.Python Comment: #
4. Multiple statements in one line: semicolons (;) allow multiple statements to be written in a single line. PS: Ends with a statement.
5. See how to run basic information
cmd window = = Input Python-h
1.2 Python basic syntax