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,702
  • 2
  • 30
  • 50

0 Answers0