I wish to replace several characters in my string to only one.
Example, "-", "." and "/" to nothing ""
I did like that:
my_string = my_string.repla ce("-", "").replace("." , "").replace ("/",
"").replace(")" , "").replace("(" , "")
But I think it's a ugly way.
What's the better way to do it?
Example, "-", "." and "/" to nothing ""
I did like that:
my_string = my_string.repla ce("-", "").replace("." , "").replace ("/",
"").replace(")" , "").replace("(" , "")
But I think it's a ugly way.
What's the better way to do it?
Comment