You can chain comparison operators arbitrarily. Apart from terser code, this also has the advantage of having to evaluate the middle expression only once.

>>> from math import factorial

# factorial function gets called twice for this example
>>> factorial(3) > 2 and factorial(3) < 10

# function needs to be called only once here
>>> 2 < factorial(3) < 10

# another example
>>> 'bat' < 'cat' < 'cater'

Video demo:

info See my 100 Page Python Intro ebook for a short, introductory guide for the Python programming language.