Precedence of Operators

Source: Internet
Author: User
#coding =utf-8
#优先级排行榜第一名, function call, addressing, subscript
#优先级排行第二名, power Operation * *
A=4*2**3
Print a

#优先级排行榜第4名, plus sign
Print 2+4*-2
#正负号的使用方法是紧挨着操作数的, otherwise an error occurs, which means that the sign takes precedence over the subtraction operation

#优先级排行榜第5名, &=*/%
Print 2+4*2/4

#优先级排行榜第7名,<< >>
#优先级排行第8名, bitwise & ^ |, where this three is also in order, but they are at the same level, all without subdivision

#优先级排行第9名, Comparison operators
A=2*3+5<=5+1*2
Print a


#优先级排行第十名, Not,and of logic, or

#优先级排行第是一名, lambda expression

Precedence of Operators

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.