# rstrip() method to remove trailing newline character from a string text= "Welcome to Python Programming " print(text.rstrip())