how can I remove whitespaces from within a user input string?
Can't I use .replace(" ","")
? it didn't work for me.
My code:
>>>p=raw_input ("Enter phrase:\n")
>>>p.replace(" "."")
It still outputs user input phrase WITH spaces..what am I doing wrong?Please help.