float to string conversion
tyler at tylereaves.com
Mon Dec 18 20:37:46 CET 2000
On Mon, 18 Dec 2000 19:00:54 GMT, deragon at 8d.com wrote:
return MSISDN + " check FAILED: $" + str(balance) + errormsg
> I am embarrassed to ask this since it is trivial, but
> I cannot figure out how to convert a float to a string (obviously,
> I am new to python). Somehow, I could not find in the 2.0
> documentation the syntax to perform the operation.
> The following in my function:
> return MSISDN + " check FAILED: $" + balance + errormsg
> where balance is a floating number and errormsg is a string
> generates the following error:
> TypeError: cannot add type "float" to string
>Sent via Deja.com
Visit Ultra Coaster Central!
The internet's largest repository
of Ultra Coaster Tracks!
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
More information about the Python-list