How to recast integer to a string

Fredrik Lundh fredrik at pythonware.com
Tue May 9 15:58:37 EDT 2006


James wrote:

> > > How to recast an integer to a string?
> > >
> > > something like
> > > n = 5
> > > str = str + char(n)
> >
> > str(n)
> >
> > Kindly
> >  Christoph
>
> In python2,4, I 've got
> TypeError: 'str' object is not callable

if you want to use a builtin function, you cannot use the same name
for your own variables.

</F>






More information about the Python-list mailing list