Python first week (first day) My Python growth is one months to get the Python data mining done! (01)

Source: Internet
Author: User
Tags logical operators

Syntax Essentials for Python

1. Notes

#表示注释, no block comment

2. Variable (weakly typed language), no need to declare type

For example, a, b = ' python ', 10

3. Built-in data types

Numeric type (shape, float, plural) boolean type string None

4. Mathematical operations

Division remainder:% Division rounding://exponentiation not supported + +,--

5. Comparison operators (> <, etc.), logical operators (and or not) do not support | | , &&

6. Conditions and cycles

Code indentation

If, if ... else, if: elif. Else no switch, case syntax

Empty list, tuples, characters, None = False

For item in collection

Range (1,10,2) interval =>[1,10)

7. Break (non-normal loop end), continue (normal cycle end)

Python first week (first day) My Python growth is one months to get the Python data mining done! (01)

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.