Skip to main content

What are strings?

Strings are text - any characters inside quotes. Python doesn’t care if you use single or double quotes, just be consistent.

Creating strings

Three ways to make strings:
Use double quotes when your text contains apostrophes: "It's Python!"

Combining strings

Join strings together with +:

String length

Use len() to count characters:

Converting to string

Turn other types into strings with str():

Common mistakes

What’s next?

Let’s explore True/False values - essential for making decisions in your code!

Booleans

True and False values