Check if a given value is out of certain range

Denis McMahon denismfmcmahon at gmail.com
Tue Sep 29 19:12:05 EDT 2015


On Tue, 29 Sep 2015 10:16:04 +0530, Laxmikant Chitare wrote:

> Is there any similar elegant way to check if a value is out of certain
> range?

What about:

if not (0 < x < 10):

-- 
Denis McMahon, denismfmcmahon at gmail.com



More information about the Python-list mailing list