Python Learning Note (iii) programming _style

Source: Internet
Author: User

Statements and syntax

* Notes

    • #: can start anywhere in a row

* Cont.

    • \:

    • ': closed operator, single statement spans multiple lines (implements multiline comment)

* code Group

    • Indent a block of code that consists of the same set of statements

    • The first line begins with a keyword, such as if.while, ending with a colon

    • Python uses indentation to separate code groups, lines of code for the same code group must be strictly left-aligned, or it can cause syntax errors

* Place multiple statements on the same line

    • ;: Semicolon as delimiter

* Module

    • Each Python script file can be used as a module

    • The code in the module can be a script that executes directly, or it can be a module that resembles a library function to be imported by another module (import)

Identifier

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/1E/wKiom1THwz_jED4EAAJG41-KR6A389.jpg "title=" 4.PNG " alt= "Wkiom1thwz_jed4eaajg41-kr6a389.jpg"/>

PYTHON3 reserved Keywords

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/1B/wKioL1THxJ_Ayx83AADq-ZDMS4g597.jpg "title=" 5.PNG " alt= "Wkiol1thxj_ayx83aadq-zdms4g597.jpg"/>

Python BASIC Programming style

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/1B/wKioL1THxRfRfxkMAAIntVGdp10633.jpg "title=" 7.PNG " alt= "Wkiol1thxrfrfxkmaaintvgdp10633.jpg"/>

Python Naming conventions

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/1E/wKiom1THxXmytVouAAItg7hoTP0112.jpg "title=" 11.PNG "alt=" Wkiom1thxxmytvouaaitg7hotp0112.jpg "/>

Python file structure

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/59/1E/wKiom1THxoqx_IfNAAKctgWy-r8153.jpg "title=" Ix16ruv48i[1 (P (2%7) jw0r.png "alt=" Wkiom1thxoqx_ifnaakctgwy-r8153.jpg "/>

This article is from the "Linux Revolution" blog, so be sure to keep this source http://kaibinyuan.blog.51cto.com/7304008/1608997

Python Learning Note (iii) programming _style

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.