Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You want to save your list in a text file? Create a file object, write a string representation of the list.

More about reading and writing files see python documentation

L = range(20)
out = file('out.txt','w')
out.write(str(L))
out.close()