0 Basic python-The interpretation process of Python and Python

Source: Internet
Author: User

Today's first contact with Python, it is very magical, especially there is a "*" syntax, directly replace the loop, really very convenient

Here is my first contact with Python-written code: only a short print

Import Sysprint (sys.platform) # System platform Print (2**100) x= "Hello World \ n" Print (x*8) #打印8次

Output Result:

>>> ================================ RESTART ================================
>>>
Win32
1267650600228229401496703205376
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World


This python can run in Python's idle, or run through the Shell Live DOS window, I use the trial Win32 platform, so the DOS window allows

I saved the above code as a python-ch3-001.py file and placed it under the C:/python34 directory and ran it through the Python command.




Now let's talk about the Python interpretation process,

See



xxx.py: We have compiled a good python file

Xxx.pyc:python Compiler-Compiled files

Pvm:python running a virtual machine


The files we write are compiled into PYC files by compilers, and then PYC files run on PVM, so Python is generally a little slower than static languages such as java,c, but we generally don't feel

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

0 Basic python-The interpretation process of Python and Python

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.