Python "First day (Getting started 002) operator"

Source: Internet
Author: User
Tags arithmetic operators bitwise operators logical operators

What is an operator?

The main description of the Python operator. To give a simple example 1+5 = 6 . In the example, 1 and 6 are called operands, and the "+" number is the operator.

The Python language supports the following types of operators:

    • Arithmetic operators
    • Compare (relational) operators
    • Assignment operators
    • logical operators
    • Bitwise operators
    • Member operators
    • Identity operator
    • Operator Precedence

Python arithmetic operators

The example demonstrates the operation of all Python arithmetic operators:

Python comparison operators

  

Python assignment operator

Python logical operators

Python member operators

Python identity operator

the identity operator is used to compare the storage units of two objects

Python operator Precedence

The following table lists all the operators from highest to lowest priority:

So far!!!!!!!!!

Python "First day (Getting started 002) operator"

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.