On 2020年12月12日 at 10:51:00 -0600, Tim Chase <python.list at tim.thechases.com> wrote: > If you want numeric-range checks, Python provides the lovely > double-comparison syntax: >> >>> x = 5 > >>> 2 < x < 10 > True Not just numbers: >>> 'm' < 'n' < 'o' True >>> 'one' < 'one point five' < 'two' True Okay, so the second one is a trap, but you get the idea. ;-)