Python pros and cons analysis and Python types, coding-class notes and after-school summaries

Source: Internet
Author: User

1, the shortcomings 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.

2, the advantages of Python:

1), large data processing, has a special function module, more convenient.

2), Linux comes with Python, the use of more extensive, more convenient.

3), Python can do automated processing, automation operations.

4), Python small digital pool: -5~257, improve efficiency, save memory space

3. 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!

4. 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

  Coding encode:unicode-> UTF8

Decoding decode:utf8-> Unicode

The above are my class notes, welcome to add, thank you!

Python pros and cons analysis and Python types, coding-class notes and after-school summaries

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.