strip char from list of strings

Laurent Luce laurentluce49 at yahoo.com
Mon May 18 15:30:28 EDT 2009


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 ?

Regards,

Laurent



More information about the Python-list mailing list