[Tutor] Range of float value

Luke Paireepinart rabidpoobear at gmail.com
Thu Feb 8 18:48:23 CET 2007


Kent Johnson wrote:
> Luke Paireepinart wrote:
>> Kent Johnson wrote:
>
>>> You can't generate all the float values in a range. (OK, you 
>>> probably could, but it would not be practical or useful.) You can 
>>> test for a value in a range, e.g.
>>> if 48.35 <= a <= 48.45:
>>>   
>> Kent:
>> Why does this work?
>
> It is explicitly supported in Python. See
> file:///C:/Python25/Doc/ref/comparisons.html
Do you mean http://docs.python.org/ref/comparisons.html ?
:)


More information about the Tutor mailing list