Operator Functions

operator.ge()

Apply the rich comparison >= to two operands, respecting Python comparison dispatch. Ordinary numeric operands return bool, but a custom comparison hook may return another object. This is a callable alternative to the expression, useful as a predicate when its result is truth-testable.

Formal Syntax & Structure

python syntaxpython
operator.ge(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.ge(5, 5))
Python Reference