Why is python psycopg2 cursor.execute not accepting returns in string?

I’m using python psycopg2 cursor.execute and noticed it doesn’t accept strings with line breaks or returns. Has anyone faced the issue where python psycopg2 cursor.execute not accepting returns in string? Looking for ways to properly format multi-line strings or escape returns so the query runs correctly.
 
Back
Top