"Concise python tutorial" reading notes

Source: Internet
Author: User

1:help

You need to get information about any function, type in Python, use the Help (' content ') command to view the assistance, and press Q to exit the help.

2: Formatting strings

The format method is an important way to format data.

String placeholder: ' {0}xx{1}xx '. Format (STR1,STR2) is assigned to 0, 1 in parentheses with str1, str2

More detailed format: ' {subscript: Format} '. Format (str) For example: {0:.3f} refers to inserting a floating-point number that retains 3 decimal places at 0.

3: Common operators

Subtraction: +-*/

Powers: * * divisible://Take remainder:% bit Operation:& | ~ ^ Logical Operation: And OR not 4: Flow control statement If--elif--else while for.    In.. Break continue

"Concise python tutorial" reading notes

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.