Python_ Foundation _01

Source: Internet
Author: User

1. Interpreter Path
#!/usr/bin/env python
2. Encoding
#-*-Coding:utf8-*-

1.ascill---00000000 (8-bit representation)

Disadvantage: Cannot express English

2.unicode---0000000000000000+ (at least 16 digits)

Disadvantage: Memory consumption, when the expression bit does not need more than 16 bits, causing excess memory consumption

    1. 3.utf-8---How much to use is to express

  Python3 no concern

Python2 each file appears in Chinese, the head must be added

3. Variable name  

-Alphabet
-Digital
-Underline

Three-element constituent variables

    • Cannot start with a letter
    • cannot be a keyword (' and ', ' as ', ' assert ', ' Break ', ' class ', ' Continue ', ' Def ', ' del ', ' elif ', ' Else ', ' except ', ' exec ', ' finally ', ' For ', ' from ', ' global ', ' if ', ' import ', ' in ', ' was ', ' lambda ', ' not ', ' or ', ' pass ', ' print ', ' raise ', ' return ', ' Try ', ' W ' Hile ', ' with ', ' yield ')
    • It's best not to repeat with Python's built-in function name

4. Recommended Programming Software

  Pycharm

Python_ Foundation _01

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.