This series starts with a basic tutorial on Python3, why choose Python 3? Because I recently saw some materials and courses that were taught in Python 3, such as big data, machine learning, data mining, and so on, and one purpose, I want to thoroughly, systematically learn the basic parts of Python 3, and then consider the others. Interested, can also follow the study, the basic skills to learn.
1. Download
1) Open https://www.python.org/downloads/
Currently the latest version is 3.6.1
2. Installation
After downloading, double click on this EXE file, at the bottom of the first page, check the add Python to path and click the default installation.
The default installation path is C drive, mine is: D:\installer project\python3.6.1
3. Open Python IDLE
In the Start menu, all programs found in Python 3.6, click on the Idle
After the code practice with this idle tool, the default open idle as, this is called Dynamic Interactive compilation environment.
This mode is not convenient for us to write multiple lines of code, how to do?
Click File->new File, there is a normal text editing page, we can write multiple lines of code.
Next, look at how to execute the code
Here we write a print statement: print (' Hello Python 3! ')
Remember, Python3 inside the print statement, need parentheses, in Python 2 is not required.
Running results are displayed in the Python shell
Summarize:
1. Python 3 's print statement is enclosed in parentheses, and Python2 does not require
2. Compile the environment, after all the demo code is in this idle environment, then F5, run the code.
3. about how Python2 and Python3 work together, you can view the online profile, the default is Python2, if you enter a python command in cmd
4. Many new features and features will be updated on Python 3, and Python 2 will not
Python 3 from Getting started to mastering 01-Environment Building