SyntaxFix
Write A Post
Hire A Developer
Questions
Simple printf() function from O'Reilly's Python Cookbook.
import sys def printf(format, *args): sys.stdout.write(format % args)
Example output:
i = 7 pi = 3.14159265359 printf("hi there, i=%d, pi=%.2f\n", i, pi) # hi there, i=7, pi=3.14