# strip() method to remove newline characters from a string text= "\n Welcome to Python Programming \n" print(text.strip())