Insist on choosing Python3

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.