Operator Functions
operator.rshift()
Shift integer bits right, with arithmetic sign behavior for negative integers. Equivalent to a >> b; custom operand types control the result.
Formal Syntax & Structure
python syntaxpython
operator.rshift(a, b, /)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| a | object | Left operand or target object. |
| b | object | Right operand. |
Return Value
object
The object result described above.
Working Example
Example Snippetpython
import operatorprint(operator.rshift(-9, 2))