On 13/11/12 09:50, Norman Khine wrote:

also which is more efficient:

c.writerow(adm_product) # writing the product to the csv when all the
fileds are found

or

products = [] # adding them to a list first and then writing them to the csv
products.append(adm_product)
c.writerow(x) for x in products

Don't guess, measure. Write a small test and compare.
timeit is your friend.


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to