Python BASICS (1) --- Introduction to python, python --- python

Source: Internet
Author: User

Python BASICS (1) --- Introduction to python, python --- python

1. Introduction to python

Python is the famous "Uncle turtle" Guido van rosum during the Christmas of 1989, a programming language written to pass the boring Christmas. Currently, Python has become one of the most popular development languages in China.

He positioning Python as "elegant", "clear", and "simple", so the Python program looks simple and easy to understand. It is not only easy for beginners to learn Python, but will also go deeper in the future, you can write very complex programs. In general, the philosophy of Python is simple and elegant. Try to write code that is easy to understand and write as few code as possible.

What can Python do:

1. network applications: including WEB development (Django, Tornado, Flask), server programs (Twisted, and eventlet), etc.

2. Scientific operations: NumPy, SciPy, matplotlib, ETS, etc.

3. GUI)

4. System Management Tools: zookeeper, such as SaltStack and Ansible for IT configuration management, virtualized OpenStack, and Bacula for backup

5. Other programs

Advantages of Python:

1. concise, elegant, and simple

2. High development efficiency

3. Advanced Language

4. Portability

5. scalability

6. embeddable

Disadvantages of Python:

1. The speed is slow. Because Python is an interpreted language, the execution efficiency is indeed not high. However, a large number of applications do not need to run at this fast speed, because the user cannot feel it. For example, to develop a network application for downloading MP3, the running time of the C program takes 0.001 seconds, and the running time of the Python program takes 0.1 seconds, which is 100 times slower, but because the network is slower, it takes one second. Do you think the difference between 1.001 seconds and 1.1 seconds is obvious? This is just like the fact that F1 cars and ordinary taxis are driving on the third ring road in Beijing. Although the theoretical speed of F1 cars is as high as 400 kilometers per hour, the speed of the third ring road is only 20 kilometers per hour, as a passenger, you feel that the speed is always 20 kilometers per hour.

2. The Code cannot be encrypted, but what does it do? No one will waste too much time researching your bad code.

3. threads cannot use multiple CPUs.

 

Python Installation

First, download the Python 3.5 installation package from the official Python Website Based on your Windows version (64-bit or 32-bit) and run

Note: Check "Add Python 3.5 to PATH" here, so that the installer automatically configures the environment variable for you.

Ii. Hello World

Now let's start our first Python code.

 1 #!/usr/bin/env python 2 ''' 3 @author: xiaocao 4 ''' 5 print('Hello World!')

How is it? Is it really easy?

Run Python on the console

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.