Python introduction, download installation configuration, first program Hello World

Source: Internet
Author: User

Python Introduction

Python features: Elegant, clear, simple

Python source code cannot be encrypted

Python is suitable for: Web sites and various network services, system tools and scripts, as "glue" language to make modules developed in other languages easy to use.

Python is not suitable for the field: hardware-close code (preferred C), mobile development ios/android have their own development language (Objectc,swift/java), game development: C + +

Python can run across platforms in Linux, Windows, Mac OS X

Python currently has 2.7 and 3.3 two versions, but the Python2.7 and 3.3 versions are incompatible with each other and many third-party libraries are currently incompatible with the 3.3 version, so getting started here is for the 2.7 version.

Python Download installation configuration

Official website Download: www.Python.org

After downloading and installing Python, open cmd (Command prompt), enter "Python" to run, Windows will be based on path this environment variable to find Python.exe, if not found will error.

Before running Python, change the environment variable under Windows system-system variable--path (edit), add the Python installation path to the last side, and OK.

After Setup, you can enter "Python" to run the Python program, ">>>", enter "100+200" carriage return, the Python program will automatically calculate the results. As shown in the following:

The first Python program "Hellow World"

Python code cannot be saved using the command prompt, it is recommended that you use notepad++ to develop on the Windows platform, you cannot use Notepad (which automatically adds special characters to the beginning of the file, causes the program to run in error), or Word (the saved text file is not stored).

After the installation opens notepad++, 1. Settings--preferences--new--Select the encoding type (). 2. The language is set to Python and the code is highlighted.

Enter print ' Hellow,world ' in notepad++, which means to print the string Hellow,world.

After saving the python file (suffix py), run the file directly into "Python hellow.py", (the dir command is to view the folder file name) as in.

Python introduction, download installation configuration, first program Hello World

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.