String question

Thomas A. Bryan tbryan at python.net
Thu Feb 17 05:39:39 CET 2000


Gaetan Corneau wrote:

> str = "n = " + str(n)
> 
> or str = "n = %d"%n
> 
> I used "str" instead of "string" because "string" is the name of a module.

Of course, str is the name of a built-in function, as the expression 
on the right of the equals sign shows.  So, perhpas using s or text or 
some other name would be better.

maybe-even-StRiNg-ly yours
---Tom



More information about the Python-list mailing list