[Tutor] How to print to a file?

denny libsvm at tom.com
Wed Feb 18 10:03:00 EST 2004

I want to write something to a file like this:
print >>filehandle, "....%d...%s..."%(num,string)
but it raise error

Can someone tell me how can I print it above to a file just like
we print to the stdout(print "....%d...%s..."(num,string)).
Or is there some funtion as we use in C/C++( fprint etc)


More information about the Tutor mailing list