If many years ago, many people may suggest that you learn Python2, of course, you will also hear the voice of learning Python3. At that time I suggest you learn Python3 directly, because in 2020, Python2 will no longer update maintenance, all business will be transferred to Python3. How do I start Python3?
1. Python requires an installation environment.
https://www.python.org/Download the installation program for the corresponding system on the Python website. Remember to add Python.exe to the environment variable
For the setup program after Python3, selecting the Add to Path,python installer will automatically add Python to the environment variable the first time it is installed. Of course you can also manually join, or set a join (set path). The simplest way to do the most complex things is to use the Python3 installer to add to the environment variables.
2. Choose a pair of IDE, for anyone recommend not to use Notepad programming, really very painful.
Text processing software can be used as a programming tool, of course, the function of these text processing software for programming is also relatively chicken, the lack of automatic completion. Do not believe that some people say, to use Notepad programming, so as to better grasp the grammar, this is definitely a big pit. You can try it yourself. The IDE recommended here is Pycharm, which uses the best Python development software.
This is the development interface, very simple very practical, slowly experience.
3. Hello World program (first egg)
For everyone who learns to program, Hello World may not be able to get over it.
1 # !/usr/bin/env python 2 # !-*-coding:utf-8-*- #设置代码的编码类型 3#Author:liuxiaoyang #设置代码作者信息 45print('helloWorld') # Output The long awaited Hello World
In the IDE, you can also set template templates directly in a Python file, which is a new Python file that initializes some of the information that you need to add in your daily work.
Writing programs with the IDE
Insist on choosing Python3