why writing list to file puts each item from list on seperate line?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

why writing list to file puts each item from list on seperate line?

From: <homepricemaps@gmail.com>
Date: Sat Dec 31 2005 - 05:22:57 CET

if i use the code below to write a list to a file

list = (food, price, store)
data.append(list)
f = open(r"test.txt", 'a')
f.write ( os.linesep.join( list ) )

it outputs to a file like this

apple
.49
star market

and i want it to do

apple, .49. star market

any ideas
Received on Tue Jan 3 03:28:23 2006