Single quoted and double quoted strings


In Python, just as in most of the programming languages you must put any free text inside a pair of quote characters. Otherwise Python will try to find meaning in the text.

These pieces of texts are called "strings".

In Python you can put string between two single quotes: '' or between two double quotes: "". Which one, does not matter.


examples/strings/quotes.py
soup = "Spiced carrot & lentil soup"
salad = 'Ceasar salad'

print(soup)
print(salad)

Spiced carrot & lentil soup
Ceasar salad