how to remove r from string in python code example Example: remove r and n from string python stocks = [x.replace("\r\n","") for x in stocks]