On 2020-12-12 at 10:51:00 -0600,
Tim Chase <python.l...@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.  ;-)
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to