Compare numbers, compare strings



examples/boolean/compare_two_numbers.py
x = 2
y = 3

if x < y:
    print("x is less than y")

# x is less than y

examples/boolean/compare_two_strings.py
x = "Snake"
y = "Stake"

if x < y:
    print("x is less than y")

# x is less than y

x = "מלון"
y = "בלון"

if x < y:
    print(f"{x} in x is less than {y}")
else:
    print(f"{y} in y is less than {x}")


x = "👸"
y = "💂"

if x < y:
    print(f"{x} in x is less than {y}")
else:
    print(f"{y} in y is less than {x}")

examples/boolean/compare_two_values.py
print(2 < 3)      # True
print("2" < "3")  # True


print(2 < 11)      # True
print("2" < "11")  # False