[EMAIL PROTECTED] wrote: > import csv > output = csv.writer(open('/Python25/working/output.csv', 'a')) > a = ["apple", "cranberry", "tart"] > for elem in range(len(a)): > output.writerow(a[elem])
output.writerow expects a sequence as an argument. You are passing a string, which is a sequence of characters. By the way, what output are you expecting to get? Do you want a file with only one line (apple, cranberry, tart), or each fruit in a different line? BTW, iterating over range(len(a)) is an anti-pattern in Python. You should do it like this: for item in a: output.writerow([item]) > Second, there is a significant delay (5-10 minutes) between when the > program finishes running and when the text actually appears in the > file. Try closing the file explicitly. Cheers, -- Roberto Bonvallet -- http://mail.python.org/mailman/listinfo/python-list