Python basics (1) --- Introduction to python



1. Introduction to PYTHON

    PYTHON is a programming language written by the famous "Uncle Turtle" Guido van Rossum during Christmas in 1989 to pass the boring Christmas. At present , PYTHON has become one of the most popular development languages ​​in China.

    Uncle Gui 's positioning of PYTHON is "elegant", "clear" and "simple", so the PYTHON program always looks simple and easy to understand. For beginners to learn PYTHON , Not only is it easy to get started, but if you go deeper in the future, you can write those very, very complex programs. In general, PYTHON 's philosophy is to be simple and elegant, try to write easy-to-understand code, and write as little code as possible.

What PYTHON can do:

    1. Network applications: including WEB development (ྲ Djan [url=http://www.cppentry.com/list.php?fid=77]PYTHON [/url], Tornado, Flask ), server Programs (Twisted, eventlet), etc.

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

    3. GUI (graphical interface)

    4. System management tools: such as SaltStack and Ansible for IT configuration management, OpenStack for virtualization, Bacula for backup, etc.

5. Advantages     of other programs

    PYTHON

:     1. Concise, elegant, simple

    2. High development efficiency

    3. High-level language

    4. Portability

    5. Scalability

    6. Embeddability Disadvantages of

    PYTHON : 1.

    Slow It is an interpreted language, so the execution efficiency is really not high. But a lot of applications don't need to run so fast because the user doesn't feel it at all. For example, to develop a network application for downloading MP3, the running time of the C program takes 0.001 seconds, while the running time of the PYTHON program takes 0.1 seconds, which is 100 times slower, but because the network is slower, it needs to wait for 1 second, you think, the user can Feel the difference between 1.001 seconds and 1.1 seconds? This is like the way F1 cars and ordinary taxis drive 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 traffic jams on the Third Ring Road is only 20 kilometers per hour. Therefore, as a passenger, the speed you feel is Always 20km.  2. The code cannot be encrypted, but what does it matter, no one will waste too much time studying your bad code.     3. Threads cannot utilize multiple CPUs. Installation of PYTHON First, download the installation package corresponding to PYTHON 3.5 from the official website of PYTHON     according to your Windows version (64-bit or 32-bit) , and run





 





 

Note: Be sure to check Add PYTHON 3.5 to PATH here, so that the installer will automatically configure the environment variables for you.

    2. Hello World

    Now start our first PYTHON code.

 

 

  

  

   1 #!/usr/bin/env PYTHON

2 '''

3 @author: xiaocao

4 '''

5 How about print('Hello World!')

 

  

  

 

    ? Isn't it really simple

      to console execute PYTHON



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326396606&siteId=291194637