how to get rid of newline character in python code example
Example 1: python removing \n from string
line = line.strip('\n')
line = line.strip('\t')
Example 2: python remove new line
lines = ("line 1 \r\n")
lines.rstrip("\n\r")
line = line.strip('\n')
line = line.strip('\t')
lines = ("line 1 \r\n")
lines.rstrip("\n\r")