Lets say I have a String: The Quick Brown Fox
. I want to insert a character in place of the spaces. So that it becomes:
The-Quick-Brown-Fox
I could do that manually by iterating throughout the string checking for spaces. But I was wondering if there's a elegant way of doing that by using some python built-in functions?