Operator Functions

operator.inv()

Invert integer bits, or invoke the object inversion protocol. Alias of invert.

Formal Syntax & Structure

python syntaxpython
operator.inv(obj, /)

Parameters & Attributes

NameTypeDescription
objobjectObject to inspect or copy.

Return Value

object

The object result described above.

Working Example

Example Snippetpython
import operatorprint(operator.inv(5))
Python Reference