Python's interactive environment
Windows command-line mode input python, jump to python interactive environment
In the interactive environment prompt >>> , enter the code directly, press ENTER, you can immediately get the code execution results.
Exit interactive environment input exit ()
Let Python print out the specified text, use the print() function, and enclose the text you want to print in single or double quotation marks, but not with single and double quotes:
>>> print ('Hello,world') Hello, World
In Python interactive mode, you can run the code directly and output the results directly, but run in interactive mode. py file is not directly output results, see
If the code in the test.py file is
>>>+ ++
Executes the result directly in command-line mode
>>>e:\pythonscript>python test.py
Find out what output is not oh ....
Next, modify the test.py file
>>>print (+ +)
Run the test.py file again in command-line mode to see
>>>E:\pythonscript>python test.py
Not to be finished .....
Python learns a