On Thu, 2007-01-04 at 17:01 -0800, _ wrote:
> (I did google for this, I promise)
> 
> How do I get python NOT to insert newlines into string representations
> of lists when I do something like this:
> 
> strCollector += "%s" % (['a', 'list', 'with', 'lots', 'of', 'elements']
> * 100)

What makes you think that that inserts newline characters? My python
doesn't do that:

>>> a = "%s" % (['a', 'list', 'with', 'lots', 'of', 'elements'] * 100)
>>> "\n" in a
False

> FYI I am using this to export data into tab delimited format

You could avoid reinventing the wheel by using the "csv" module.

-Carsten


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

Reply via email to