Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. 4.3. Comparisons
  2. There are eight comparison operations in Python. They all have the same priority (which is higher than that of the Boolean operations). Comparisons can be chained arbitrarily; for example, x < y <= z is equivalent to x < y and y <= z, except that y is evaluated only once (but in both cases z is not evaluated at all when x < y is found to be false).
  3.  
  4. This table summarizes the comparison operations:
  5.  
  6. Operation Meaning
  7. < strictly less than
  8. <= less than or equal
  9. > strictly greater than
  10. >= greater than or equal
  11. == equal
  12. != not equal
  13. is object identity
  14. is not negated object identity
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement