difference between %s and %d

Arnaud Delobelle arnodel at gmail.com
Fri Oct 1 23:01:50 CEST 2010


Ethan Furman <ethan at stoneleaf.us> writes:

> If I'm printing the number 735, or any other positive or negative
> integer, is there any difference between %7s and %7d?
>
> ~Ethan~

To link with another thread:

>>> "%s" % True
'True'
>>> "%d" % True
'1'

-- 
Arnaud



More information about the Python-list mailing list