0

I am looking for a pythonic way to replace multiple characters in a string.

For Example: "Sault Ste. Marie" to "SaultSteMarie"

I know that I can use the replace function here:

"Sault Ste. Marie".replace(' ', '').replace('.', '')

but I am looking for a more elegant solution.

Zain Khan
  • 3,753
  • 3
  • 31
  • 54

0 Answers0