Operator Functions

operator.and_()

Compute bitwise intersection for integers or set intersection for sets; not short-circuit and. Equivalent to a & b; custom operand types control the result.

Formal Syntax & Structure

python syntaxpython
operator.and_(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.and_(6, 3))
Python Reference