Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Python

Operator >=

Tests whether the left value is greater than or equal to the right value.

Version: Python 3.14; repository image, production runtime not attested

Syntax

left >= right

Tests whether the left value is greater than or equal to the right value.

An inclusive lower-bound check admits the threshold itself. The right operand can provide the corresponding reflected less-than-or-equal comparison.

Built-in ordering between an integer and a string raises a type error, even when the string contains digits. Parse numeric text before applying a numeric threshold.

Strings compare lexicographically by Unicode code point, including strings consisting of digits.

Syntax

left >= right

__ge__, __le__ · TypeError

Worked example

3 >= 3 → True
"12" >= "2" → False
3 >= "3" → TypeError

Examples

print(7 >= 7)
print("10" >= "2")

Result

True
False

Strings compare lexicographically by Unicode code point, including strings consisting of digits.

Sources