Better way to replace/remove characters in a list of strings.
Philipp Pagel
pDOTpagel at gsf.de
Mon Sep 4 06:45:43 EDT 2006
Chris Brat <chrisBrat at gmail.com> wrote:
> Is there a better way to replace/remove characters (specifically ' and
> " characters in my case, but it could be anything) in strings in a
> list, than this example to replace 'a' with 'b':
x = map(lambda foo: foo.replace('a', 'b'), x)
cu
Philipp
--
Dr. Philipp Pagel Tel. +49-8161-71 2131
Dept. of Genome Oriented Bioinformatics Fax. +49-8161-71 2186
Technical University of Munich
http://mips.gsf.de/staff/pagel
More information about the Python-list
mailing list