1s = ' Hello World From Pankaj \t\n\r\t Hi There '
2
3>>> s.replace(" ", "")
4'HelloWorldFromPankaj\t\n\r\tHiThere'
1## Remove the Starting Spaces in Python
2
3string1=" This is Test String to strip leading space"
4print (string1.lstrip())
5