How to output a complex List object to a file.

Chris Rebert clp2 at
Mon Jun 22 21:55:41 EDT 2009

2009/6/22 bluefisher80 <bluefisher80 at>:
> Actually I think i am just looking for
> print >>, myListObj

Well, that syntax is deprecated. And you'd have to create the actual
file object. And put it in a variable.
So it's more like:

f = file("", "w")

However, the fact that you want to do this suggests a code smell.
Why do you need to do this in the first place?


More information about the Python-list mailing list