String question

Thomas A. Bryan tbryan at python.net
Wed Feb 16 23:39:39 EST 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