Counting iterations
Steven Bethard
steven.bethard at gmail.com
Sat Apr 9 19:17:23 EDT 2005
Andrew Dalke wrote:
> "pet#%i" % (i+1)
>
> (NOTE: most times that's written %d instead of %i)
Any reason to prefer %d over %i? The library reference seems to suggest
that they're the same thing[1]. I've typically used %i since I can
remember it from the int type, like I can remember %f from the float
type. Is there any reason not to?
STeVe
[1] http://docs.python.org/lib/typesseq-strings.html
More information about the Python-list
mailing list