<human>:  string remove white spaces three different way.
<bot>: Here is a Python code for string remove white spaces three different ways

import re

def remove_white_spaces(text):
  """Remove white spaces from a string."""
  return re.sub(r'\s+','', text)

# Enter the string
text = "Hello \nWorld"

# Calling the function
print((remove_white_spaces(text)))

#Example Output
# HelloWorld

#Remember to inspect code for bugs.