how to remove space from string in python without inbuilt code example Example: python remove spaces string=' t e s t ' print(string.replace(' ',''))