human
remove multiple \n from text.
assistant
Here is a Python function to remove multiple n from text

import re

def remove_multiple_newlines(text):
    """Remove multiple \n from text."""
    return re.sub(r'(\n+)', '\n', text)

# Enter the string
string = "hello\nworld\n"

# Calling the function
print((remove_multiple_newlines(string)))

#Example Output
# hello
# world

#Remember to inspect code for bugs.