Not logged in
Log in now
Create an account
Subscribe to LWN
Recent Features
LWN.net Weekly Edition for February 16, 2012
Book review: Open Advice
Linux support for ARM big.LITTLE
LWN.net Weekly Edition for February 9, 2012
XBMC 11 "Eden"
a=[1,2,3] f=open("file.txt","w") print(a,file=f) f.close()
works with any object with .__str__ mehtod.
please don't use Python-3
Posted Dec 5, 2008 22:11 UTC (Fri) by nevyn (subscriber, #33129) [Link]
a = [1,2,3] f = open("/tmp/file.txt","w") print >>f, a
Copyright © 2012, Eklektix, Inc. Comments and public postings are copyrighted by their creators. Linux is a registered trademark of Linus Torvalds