C
Chris Brat
Hi,
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 = ["abbbb","123a","nnnnas"]
for i, v in enumerate(x) :
x = v.replace("a","b")
This works, but I'd like to know peoples opinions.
Thanks
Chris
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 = ["abbbb","123a","nnnnas"]
for i, v in enumerate(x) :
x = v.replace("a","b")
This works, but I'd like to know peoples opinions.
Thanks
Chris