Python pros and cons analysis and Python types

Source: Internet
Author: User

The disadvantages of Python:

May run slightly less quickly than other types of languages. The C language is the best at running performance, because C is closest to the bottom of the computer.

Advantages of Python:
    1. Big Data processing, there is a special function module, more convenient.
    2. Linux comes with Python, which is more widely used and more convenient.
    3. Python can be automated, automated, and operational.
    4. Python small digital pool: -5~257, improves efficiency and saves memory space
types of Python:

Cpython: Use the C interpreter to interpret the extension:. PYC C Interpreter-.PYC (bytecode)-Machine code-CPU
Jpython: Using Java interpreter Java bytecode-machine-code-CPU
IronPython: Using C # interpreter C # bytecode-machine-code-CPU

PyPy: Fast running speed, principle: Interpreter---byte code----compiled into machine code--Directly run the machine code, the user runs directly using the machine code, so run fast.

Summary: CPython runs fast. The Python principles of all languages are roughly the same, PyPy will definitely fire!

Python code:

Unicode: Universal code, a standard encoding, Python2 the encoding that is used by default. At least 16 bits are required to store. Other encodings are optimized for this encoding, such as UTF-8,GBK.

UTF-8: Compression and refinement of Unicode (numbers, letters and ASCII codes using 8-bit encoding to store), Python3 default encoding used, European characters: 2 bytes, 16-bit storage; Chinese characters: 3 bytes, 24 bit storage

Summary: Python3 default encoding is UTF-8, encoding conversion principle: first converted to Unicode and then converted to other encodings

Code Encode:unicode-UTF8

Decoding Decode:utf8-Unicode

Blog Handling Address
    • Python Pros and cons analysis

Python pros and cons analysis and Python types

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.