Home / Python Operators / How to Compare Two Values in Python In this example we will show how to compare two values and get the Boolean answer in Python. Source Code print(1 > 2) print(1 == 2) print(1 < 2) Output: False False True