[BangPypers] if not with comparision statement in python
Noufal Ibrahim
noufal at gmail.com
Sat Jul 30 10:40:29 CEST 2011
Asif Jamadar <asif.jamadar at rezayat.net> writes:
> if not minimum<=actual_result and not maximum>=actual_result:
>
>
> How to check if actual result is not laying between minimum value and maximum value.
>
> how should I represent the above statement in python?
>
> Any suggestions?
[...]
The following will check for result being within range.
if min <= result <= max:
within_range()
Negating that
if not min <= result <= max:
without_range()
will check if the value is without.
--
~noufal
http://nibrahim.net.in
Smoking is the leading cause of statistics.
More information about the BangPypers
mailing list