how to remove new line character in python code example
Example 1: remove n from string python
a_string = a_string.rstrip("\n")
Example 2: python remove new line
lines = ("line 1 \r\n")
lines.rstrip("\n\r")
a_string = a_string.rstrip("\n")
lines = ("line 1 \r\n")
lines.rstrip("\n\r")