"Python Introduction and basic Concepts"

Source: Internet
Author: User
Tags naming convention

Concise python Tutorial: http://sebug.net/paper/python/index.html
python features: simple, easy to learn, free open source, high-level language, portability, interpretive, object-oriented, extensible, embeddable, Rich library.
Object-oriented: Python supports both process-oriented programming and object-oriented programming.
How to exit the Python prompt: If you are using the Linux/bsd shell, press ctrl-dExit the prompt, or, if it is in the Windows command, press ctrl-zThen press Enter
Python basic data type: number, the type of number in string Python except for integers, long integers, floating-point numbers, and plural。 String: Python can use single quotation marks ('), double quotation marks ("), and three quotation marks (" "" or "") to indicate a string. The string is immutable.
Naming of identifiers:Variables are examples of identifiers. Identifiersis used to mark some kind of thing.'s name. Follow these rules when naming identifiers:
    • The first character of the identifier must be the letter in the alphabet (uppercase or lowercase) or an underscore ('_')
    • Other parts of the identifier name can consist of a letter (uppercase or lowercase), an underscore ('_'), or a number (0-9)
    • The identifier name is case-sensitive. For example, MyName and myname are not identifiers.
    • Examples of valid identifier names are I, __my_name, name_23, and A1B2_C3
    • Examples of invalid identifier names are 2things, this was spaced out, and my-name
The Ps:python Identifier naming convention is the same as the naming convention for Java identifiers.

python only needs to assign a value to them when using variables. You do not need to declare or define a data type.
Physical and logical lines: the physical line is the one you are writing the program SeeOf Logical line is Python SeeThe single statement. Python assumes that each Physical LineCorresponds to a Logical Line
Backslashes can be used as explicit row connections. python syntax: Force indentation.





"Python Introduction and basic Concepts"

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.