Are there sprintf in Python???

Nanjundi nanjundi at gmail.com
Tue Jan 23 01:53:27 CET 2007


> Are there any sprintf in Python?

Refer module StringIO - just like file input/output operations.
cStringIO is another module  (faster)

Quick intro:
from StringIO import StringIO
s = StringIO()
s.write('hello')
s.seek(0)
print s.read() 

-N




More information about the Python-list mailing list