Jeff Johnson wrote:
> Uwe:  That is what I was expecting, but I do not get that.
> 
> I am writing the string to a file. When I view the file I get astr, not 
> the two records separated by the return.
> 
> f = open('text.txt', 'w')
> f.write(astr)
> 
> yields one string in the file and not two records.
> 
> Jeff
> 

Maybe you want something like:

alist = ['field1', 'field2', 'field3', 'field4']
f = open('text.txt', 'w')
alen = len(alist)
i = 0
while(i+2 <= alen):
    f.write("%s %s\n" % (alist[i], alist[i+1]))
    i = i+2



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to