Operator Functions

operator.iadd()

Add using in-place dispatch; a list may be mutated, while integers are replaced. Return the operation result; the function cannot rebind the caller’s variable. Assign the returned object when the target may be replaced.

Formal Syntax & Structure

python syntaxpython
operator.iadd(a, b, /)

Parameters & Attributes

NameTypeDescription
aobjectLeft operand or target object.
bobjectRight operand.

Return Value

object

The object result described above.

Working Example

Example Snippetpython
import operatorprint(operator.iadd(5, 2))
Python Reference