0 out of 464 challenges solved
Write a function `remove_whitespaces` that takes a single string as input and returns a new string with all whitespaces removed. #### Example Usage: ```python [main.nopy] remove_whitespaces(" Google Flutter ") # Output: "GoogleFlutter" remove_whitespaces(" iOS Swift ") # Output: "iOSSwift" remove_whitespaces(" Python Programming ") # Output: "PythonProgramming" ``` #### Constraints: - The input string may contain leading, trailing, or multiple consecutive whitespaces. - The function should handle empty strings gracefully.
def remove_whitespaces(text): """ Remove all whitespaces from the given string. Args: text (str): The input string. Returns: str: The string with all whitespaces removed. """ # Replace the following line with your implementation pass