sorry for asking such beginner questions but i tried this and nothing
wrote to my text file

for food, price, store in bs(food, price, store):
                out = open("test.txt", 'a')
                out.write (food + price + store)
                                out.close()


while if i write the following without the for i at least get
something?
out = open("test.txt", 'a')
out.write (food + price + store)
out.close()


Scott David Daniels wrote:
> [EMAIL PROTECTED] wrote:
> > the problem with writing to teh file immidiately is that it ends up
> > writing all food items together, and then all store items and then all
> > prices
> >
> > i want
> >
> > food, store, price
> > food, store, price
> >
> Well, if it all fits in memory, append each to its own list, and then
> either finally if you can or periodically if you must:
>
>      for food, store, price in zip(foods, stores, prices):
>          <do some writing.>
> 
> -- 
> -Scott David Daniels
> [EMAIL PROTECTED]

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to