Convert float to string ...

Grant Edwards grante at visi.com
Tue Aug 23 10:53:27 EDT 2005


On 2005-08-23, Konrad Mühler <konrad at my-rho.de> wrote:
> Hi,
>
> a simple question but i found no solution:
>
> How can i convert a float value into a string value?
>
>
> string_value1 = string(float_value) + ' abc'

 string_value1 = str(float_value) + ' abc'

Or the more versatile:

 string_value1 = "%10.3f abc" % float_value

-- 
Grant Edwards                   grante             Yow!  I'm having a BIG
                                  at               BANG THEORY!!
                               visi.com            



More information about the Python-list mailing list