why writing list to file puts each item from list on seperate line?
- From: homepricemaps@xxxxxxxxx
- Date: 30 Dec 2005 20:22:52 -0800
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
.
- Follow-Ups:
- Re: why writing list to file puts each item from list on seperate line?
- From: Steven D'Aprano
- Re: why writing list to file puts each item from list on seperate line?
- From: limodou
- Re: why writing list to file puts each item from list on seperate line?
- Prev by Date: Re: Python as a Server vs Running Under Apache
- Next by Date: why writing list to file puts each item from list on seperate line?
- Previous by thread: questions about py2exe and wax
- Next by thread: Re: why writing list to file puts each item from list on seperate line?
- Index(es):
Relevant Pages
|