Are there sprintf in Python???

Nanjundi nanjundi at gmail.com
Mon Jan 22 19:53:27 EST 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