def remove_witespace(data_of_string): string = "" for char in data_of_string: if " " not in char: string = string + char return string print(remove_witespace("python is amazing programming language"))