[2.19] study notes Python member operator, the identity of operators, operator precedence

Member operator

Not going to use, and then add time and other school list

\(in\)\(not in\)

\ (in \) : If you find the specified value in the specified sequence, the returned \ (to true \)
\ (not in \) : If you find the specified value in the specified sequence, the returned \ (false \)

Identity operator

Also temporarily not

\(is\)\(is not\)

\ (IS \) : to determine whether the two references to the same object identifier
\ (IS not \) : to determine whether the two identifiers refer to different objects

priority

  1. \(**\)
  2. ~, +, - (sign)
  3. *, /, %, //
  4. +, -
  5. <<, >>
  6. &
  7. |, ^
  8. , <, >=, <=

  9. ==, !=
  10. =, +=, -= ...
  11. Identity operator
  12. Member operator
  13. \(not\), \(and\), \(or\)

Guess you like

Origin www.cnblogs.com/with6676/p/12334102.html