Ed: You are correct. My list has only the data and I am trying to write it as a string to a file with a new line at the end of each record. Each record has the same number of fields.
The list works great for me because I mentioned that the text file I start with is a mess. Data is delimited by spaces and one field is an address that can have no spaces up to 10 spaces. To make things interesting there is crlf's randomly spaced throughout the data that need to be stripped. As I mentioned in an earlier email, the list we are talking about is the cleaned up version of the data. Jeff Jeff Johnson [EMAIL PROTECTED] SanDC, Inc. 623-582-0323 Fax 623-869-0675 Ed Leafe wrote: > On Sep 24, 2007, at 9:37 AM, Jeff Johnson wrote: > >> ['field', 'field', '\n', 'field', 'field'] >> >> There are a fixed number of fields per record. I am inserting the >> '\n' >> into the list at the end of records prior to converting the list >> back to >> a string for writing. > > OK, so at some point before that you have: > > ['field', 'field', 'field', 'field', ...] > > ... and then you insert the newlines into the list, based on the > field count; is that correct? If so, I can show you how to approach > this differently. But I want to make sure that this is what you are > starting from before writing up a solution and explanation. Also, you > said that there are a fixed number of fields per record; is this > field count variable from case to case, or will it always be the same > fixed number? > > -- Ed Leafe > -- http://leafe.com > -- http://dabodev.com _______________________________________________ Post Messages to: Dabo-users@leafe.com 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]