# Python3 code to remove whitespace def remove(string): return "".join(string.split()) # Driver Program string = ' g e e k ' print(remove(string))