remove r and n from string python code example
Example 1: python strip newline from string
a_string = a_string.rstrip("\n")
Example 2: remove r and n from string python
stocks = [x.replace("\r\n","") for x in stocks]
a_string = a_string.rstrip("\n")
stocks = [x.replace("\r\n","") for x in stocks]