Check if a given value is out of certain range
steve at pearwood.info
Wed Sep 30 05:14:40 CEST 2015
On Wed, 30 Sep 2015 01:08 pm, Random832 wrote:
> Steven D'Aprano <steve at pearwood.info> writes:
>> It's not fine. In Python 2,
>> Testing a numeric value within a certain range of values should be
>> constant time and constant memory. It should be *fast*. Using range in
>> Python 2 is none of those things.
> I wasn't aware we were discussing Python 2.
Was there something in the OP's question that suggested to you that we were
only discussing Python 3?
Python 2.7 is still the main version used by most people.
More information about the Python-list