Code to remove spaces and punctuation
marks from an input string