Convert float to string ...

Fredrik Lundh fredrik at pythonware.com
Tue Aug 23 10:56:05 EDT 2005


Konrad Mühler wrote:

> 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'

str(float_value) + 'abc'

repr(float_value) + "abc"

'%fabc' % float_value

'%gabc' % float_value

(etc)

the tutorial has more information:

    http://docs.python.org/tut/node9.html

</F> 






More information about the Python-list mailing list