fprintf(): Python Equivalent????

Roy Smith roy at panix.com
Mon Jun 18 21:25:36 EDT 2001


prem at engr.uky.edu (Prem Rachakonda) wrote:

> HI,
>   Does python have some function which does a formatted file writing
> functionality similar to C's
> 
> fprintf(fp,"%s %s",string1, string2);

Sure.

fp.write ("%s %s" % (string1, string2))



More information about the Python-list mailing list