On this page
operator.iand
Prev: operator.iadd | Up: operator | Next: operator.iconcat
Rel: operator.abs, operator.add, operator.and_, operator.attrgetter
Ref: docs.python.org — operator.iand
Tags: #public #python3 #stdlib #operator
Import
import operator
from operator import iand
Signature & Overview
operator.iand(a, b, /)
Same as a &= b.
Usage
import operator
s = {1, 2, 3}
assert operator.iand(s, {2, 3, 4}) == {2, 3}
Gotchas
- In-place
&=: Always assign the return value for immutable types.
REPL Inspect
from operator import iand
help(iand)
Linked from
Related notes
- tuts/python3/stdlib_module/operator/iadd Linked here; links to this page; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/iconcat Linked here; links to this page; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/operator/abs Linked here; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/add Linked here; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/and_ Linked here; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/attrgetter Linked here; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/call shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/concat shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/contains shared tags: #operator, #stdlib