Python Text

The difference between single quotes ‘‘ vs triple quotes ‘‘‘ ‘‘‘ can be very useful with complex Python text.

Explanation:

Now, we started and ended the string with triple quotes, so we can now include quotes within the newspaper_quote variable and have it print what we want. This is especially helpful when dealing with SQL statements for ex, because you’ll have a WHERE clause where you’ll need to filter based on some data (like country = ‘Canada‘ ), and the triple quotes in Python will allow for you to have the SQL executed from Python without any errors.