Convert int to float
Guido van Brakel
guidovb1 at invalid
Sat Mar 15 17:53:16 EDT 2008
Grant Edwards wrote:
> On 2008-03-15, Guido van Brakel <guidovb1 at invalid> wrote:
>> Hello
>>
>> I have this now:
>>
>>> def gem(a):
>>> g = sum(a) / len(a)
>
> g = float(sum(a)) / len(a)
>
>>> return g
Hi,
Thank you very much,sometimes it is so amazing simple.
Regards
--
Guido van Brakel
Life is like a box of chocolates, you never know what you're gonna get
--
More information about the Python-list
mailing list