I want to convert 1/2 in python so that when i say print x (where x = 1/2) it returns 0.5
I am looking for the most basic way of doing this, without using any split functions, loops or maps
I have tried float(1/2) but I get 0... can someone explain me why and how to fix it?
Is it possible to do this without modifying the variable x= 1/2 ??
Thanks
without modifying the variable x= 1/2
? – eat Jan 30 '11 at 10:59