Environment: notepad++,python2.7.13
Compile: Write the. py file first, and then run the script with the Python command in the terminal (the runtime terminal directory to be located in the running. py file directory)
Exercise One:
In the Python2 version, the double quotation mark "" and the single quotation mark "can be used for output without parentheses, and the statement ends without a semicolon;
When you want to output quotes in a sentence, you can use different kinds of quotes to output
You can use a text editor to write the. py suffix of the Python script, and then run the script directly in the terminal with Python.
(If you have more than one version of Python, use the Python version of the script to run the command without the version Python)
Single-line comment #; multiline comment three single or double quotation marks "and" ";
When scripting with notepad++, save the file in. py format before editing, and then continue editing to see the various colors.
Output Chinese in code: Add #--Coding:utf-8--to the beginning of the file and change the encoding settings of the notepad++.
Stupid way to learn python (i)