strip char from list of strings

David Stanek dstanek at dstanek.com
Tue May 19 03:32:01 EDT 2009


On Mon, May 18, 2009 at 3:30 PM, Laurent Luce <laurentluce49 at yahoo.com> wrote:
>
> I have the following list:
>
> [ 'test\n', test2\n', 'test3\n' ]
>
> I want to remove the '\n' from each string in place, what is the most efficient way to do that ?
>

What have you tried so far?

-- 
David
blog: http://www.traceback.org
twitter: http://twitter.com/dstanek



More information about the Python-list mailing list