[Tutor] floating point range() ?
Dave S
pythontut at pusspaws.net
Mon Jun 21 13:32:01 EDT 2004
Lloyd Kvam wrote:
>There is no builtin range for floats. There is a Python Cookbook frange
>recipe which could be useful.
>
>An alternative for getting the list is:
> [i*.5 for i in range(200)]
>
>
>
Thanks for your input,
[i*.5 for i in range(200)]
'list comprehension' (think I got it right) is something I had forgotten about but
I can see a use for it now :-)
Cheers
Dave
More information about the Tutor
mailing list