Sei sulla pagina 1di 2

7/6/2017 Complete Precedence Table | Operators Relational, Logical and Membership | CSE1309x Courseware | edX

UTAx: CSE1309x Introduction to Programming Using Python Help

Course Week 3 Operators Relational, Logical and Membership Complete Precedence Table

Complete Precedence Table


Bookmark this page

Complete Precedence Table


The following table shows the completeprecedence of Python Operators: Highest to
Lowest

OPERATOR DESCRIPTION

() Parenthesis (grouping)

f(args...), x[i:i], x[i], x.attr Function call, slicing,


subscript, dot

** Exponentiation

+, -, ~ Unary Positive, Unary Negative,


bitwise NOT

*, /, % Multiplication, Division,
Remainder

+, - Addition, Subtraction

<<, >> Shifts

& Bitwise AND

^ Bitwise XOR

| Bitwise OR

https://courses.edx.org/courses/course-v1:UTAx+CSE1309x+2016T1/courseware/991c6aa4e79c49aeb2c2a002ed1c3095/f41a80fc43fe4a21a00d5c91 1/2
7/6/2017 Complete Precedence Table | Operators Relational, Logical and Membership | CSE1309x Courseware | edX

<, <=, >, >=, !=, ==, is, is Comparisons, identity,


not, in, not in membership

not Boolean NOT

and Boolean AND

or Boolean OR

lambda Lambda Expression

References:

Punch, W. F., and Richard J. Enbody. "Beginnings."The Practice of Computing Using Python.
Boston, MA: Addison-Wesley/Pearson, 2011. 737. Print.

All Rights Reserved

English

20122017 edX Inc. All rights reserved except where noted. EdX, Open edX and the edX and Open edX logos
are registered trademarks or trademarks of edX Inc. | ICP17044299-2

https://courses.edx.org/courses/course-v1:UTAx+CSE1309x+2016T1/courseware/991c6aa4e79c49aeb2c2a002ed1c3095/f41a80fc43fe4a21a00d5c91 2/2

Potrebbero piacerti anche