# Comparison Operators

> Markdown source of <https://docs.calebsargeant.com/programming/python/bootcamp/comparison-operators/>.

``` python
2 == 2
2 == 1
'hello == 'bye'
'Bye' == 'bye'
'2' == 2
2.0 == 2
3 != 3
4 != 5
2 > 1
1 < 2
1 < 2
2 < 5
2 >= 2
4 <= 1
```

## Chaining Comparison Operators with Logical Operators

- We can use logical operators to combine comparisons:

  > - and
  > - or
  > - not

``` python
1 < 2 and 2 < 3
'h' == 'h' and 2 == 2
1 == 1 or 2 == 2
not(1 == 1)
```
