how to get read of white spaces in python code example Example: remove after and before space python st = " a " strip(st) #Output : "a"