I have been looking around this site searching for how to remove unwanted carriage returns. The solutions I found use strip() or rstrip() to remove the
strip()
rstrip()