my_string = "Hello, world!\n" my_string = my_string.rstrip("\n") print(my_string)