The first Python program

Source: Internet
Author: User

First, Python2/python3

Python2 Although the current use more, and is very mature, but it is more python3 than the congenital deficiencies. Python3 also more and more widely supported, Python3 is also the future. Officials say 2020 years later will no longer support Python2, and all updates to the latest standard library will only be updated on Python3. The biggest difference between Python2 and Python3 is the character encoding, and python3 small changes to many small details of python2, such as changes in the name of some libraries. I study at present from Python3 start, take into account python2 grammar.

  PS: Of course python2.7.x is a transitional version, is a product between Python3 and Python2, some python3 is not supported by the python2.7 can be implemented.

second, Python installation Windows
1 , download installation package    https://www.python.org/downloads/2, install    default installation path: \ C Python273, configure environment variable    "right-click Computer"-"attribute"-"Advanced system Settings"-"Advanced"-"Environment variable"-"in the Second content box find the variable named path Row, double-click the "- " Python installation directory to append to the variable value, and split "    such as: the original value; C:\python27, remember that there's a semicolon in front

Linux, Mac

no need to install, original Python environment  PS: If comes with 2. 6, please update to 2. 7

Third, the choice of the editor

Currently writing Python editor countless, in the study of Baidu also searched for several more use of the editor, such as Eclipse, Atom, Pycharm. After experimenting with the self-feeling for my editor is Pycharm, it has real-time debugging is suitable for debug, the interface looks very comfortable.

About the installation and configuration of software no longer repeat, self-Baidu. The most important thing to note is the addition of the interpreter path, which will cause the program to fail to run if the addition is unsuccessful.

Iv. the first Python program

In general, the first procedure with a sense of ritual is, of course, to let the program output "helloworld! ”

# -*-coding:utf-8-*- # Author:laocai Print ('helloworld!  ')

Friends who have learned other programs can see the simplicity of the Python language syntax.

Five, book recommendation

A book "Concise Python Tutorial" recommended for a completely novice is perfect for friends without any foundation, Gitbook link address:

Https://www.gitbook.com/book/lenkimo/byte-of-python-chinese-edition/details

The first Python program

Related Article

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.