Python's understanding and environment building

Source: Internet
Author: User

The author is a small white, I will record my study period of learning experience Summary! Although for many people, learning to program is not necessary to take any notes. Constantly knocking on the code can be, but for me only the basis of the "theory and practice plus summed up" to learn, efficiency is still pretty high

A tall building on the ground, can't forget the foundation

    • The guide that I have learned is teacher Liao 's Python2.7 tutorial and Python official information

Understanding of Python

    • Author (Guido) during the Christmas holiday of 1989, he developed a new script interpreter Python for his boredom in order to pass the time.
    • python, like other programming languages, is a high-level computer programming language that is used by many well-known internet companies, such as YouTube, Instagram, Google, Red Hat , Facebook also has the domestic watercress, Sohu, jinshan, potatoes, shell nets and other internet companies
    • Python in the 2014 Tiobe ten programming leaderboard, Python in all languages ranked five, in the explanatory language, ranked first
    • in fact, no matter what programming language, the purpose is to let the computer work! What is the difference between Python and other high-level languages:

†c language can be used to write the operating system of the hardware-close language, so the pursuit of speed, to fully play the hardware performance

†c++ can be used to write 3D games, achieve 3D, appear more realistic

†python can be a high-level programming language for writing applications

    • Advantages of Python:

† Rich third-party libraries that can be developed quickly based on these third-party libraries

† Cross-platform applications that place code on other platforms, running in minutes

† Scalability, in the bottom can refer to the C language library, call C + +, Java modules are available

† "Sticky" A C program, such as memory read and write, data sequencing, etc. python is also a "glue" language

† Small amount of code, such as C requires 1000 lines to complete the task and Python only need 20 lines

† The author's positioning of Python is "elegant", "clear", "simple", so the Python program always looks easy to understand

† Ability to develop Web applications, including websites, backend services

† Daily needed gadgets (including the scripting tasks required by the system administrator), to wrap up programs developed in other languages for easy use

    • Disadvantages of Python

† Run slowly because Python is an interpreted language, and the code you write must be executed in one piece.

† Code cannot be encrypted, and if you want to publish a Python program, you are actually publishing the source code.

Why learn Python

    • The above advantages there is enough reason for me to learn python, the early stage is because I heard the story of reptiles, and then I in various forums, know that Python is very powerful!
    • Life is short, I like python! The Python language is very easy to use and even Google is using Python on a large scale, giving me more power
    • The philosophy of the developer is:

† In one way, it is best to have only one way to do something

† A lot of features like Java, C + + Dozens of lines, or even hundreds of lines of code, Python may take just a few lines of code to make it easier

    • So I chose Python to be very correct and sensible

The difference between Python versions

    • There are two versions of Python:

†python2.x (Currently the latest version is 2.7.10)

†python3.x (Currently the latest version is 3.4.3)

    • These two versions are incompatible because Python is now evolving towards the 3.x version, and you can see some simple changes
    • The most frequently used print function, in Python2, we can print "Hello World" directly or use single quotation mark print ' Hello world! ', but in Python3 the print has been used as a built-in function, and the Hello World information that needs to be done: print ("Hello world!")
    • So for my beginner's point of view, installing learning Python2 is a good choice, it can reduce the number of compatibility problems I bring in my learning process.

Python's Environment Building

    • Python is cross-platform and can run on Windows, Macs, and various Linux/unix systems. Writing Python programs on Windows, running on Linux, running on Mac
    • Installation is very simple, the author is not to write tutorials, so here do not post installation steps! If it is not installed, please Google yourself
    • The author of the operating system used in the company is win7_64 bit operating system, so is installed Python 2.7 64 bit
    • Official: Click to go to download after the installation is complete, open a command prompt, enter "Python" with the following tips >>>, enter the interactive interface, indicating the installation is successful
Python 2.7.10 (default, May, 09:40:32) [MSC v.1500-bit (Intel)] on Win64type "help", "copyright", "credits" or "License" for more information.>>>
    • >>>exit () can exit interactive or CTRL + C can exit the interactive

Python's understanding and environment building

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.