Convert float to string ...

Matt Hammond matt.hammond at rd.bbc.co.uk
Tue Aug 23 16:47:16 CEST 2005


> How can i convert a float value into a string value?

Try:
     string_value1 = str(float_value) + ' abc'
or:
     string_value1 = repr(float_value) + ' abc'


Type in an interactive python session.
     help(str)
or:
     help(repr)


regards


Matt
-- 

| Matt Hammond
| R&D Engineer, BBC Research and Development, Tadworth, Surrey, UK.



More information about the Python-list mailing list