Type Casting...

Ignacio Vazquez-Abrams ignacio at openservices.net
Tue Sep 18 20:31:35 CEST 2001

On Sun, 16 Sep 2001, David In VA wrote:

> I have a variable that is storing a numeric value.  I need the string
> representation of that value.  I would imagine type casting would be the
> thing to use.  can someone please tell me how to do this in Python?

No, you wouldn't use casting for this:

c='%d' % a
d='%.2f' % b

Ignacio Vazquez-Abrams  <ignacio at openservices.net>

More information about the Python-list mailing list