Psst! Check what courses we have in our offer, and get them all here to save $727. Act fast–this deal is available only 3/14–3/21.
Introduction
Quick recap
2. Strings in Python
Indexing and slicing
Summary

Instruction

In Python, strings are text values in single ('sample text') or double quotes ("sample text"). There is no difference between these two notations; whichever you use, simply try to stay consistent. In this course, we'll stick to single quotes.

greeting = 'Hello, world!'
print(greeting)

The code above creates a new variable named greeting and prints its value to the output.

Exercise

Create a variable named species with the following content: Aspidites melanocephalus

Stuck? Here's a hint!

Remember to put the content inside single quotes.