1string = "Hello, world! Some more text here..." # Just a string
2string.replace(" ", "") # Replaces all instances of " " (spaces)with "" (nothing)
3
4# string is now "Hello,World!Somemoretexthere..."
5# I hope I helped you! ;)
1s = ' Hello World From Pankaj \t\n\r\t Hi There '
2
3>>> s.replace(" ", "")
4'HelloWorldFromPankaj\t\n\r\tHiThere'