Python 3 from Getting started to mastering 01-Environment Building

Source: Internet
Author: User

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

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.