Loading
.
Python Principles

Strings

What is a string?

Strings are how you represent text in Python. Anytime you need to work with text, you'll need strings.

A string is simply some letters in a row. These are surrounded by quotation marks.

Here are three examples of strings:

"test"
"this is a string"
"hello world"

Strings can be put into print just as with numbers. This displays text in the output box:

print("test")

Run the code and see what happens to continue.

Lesson completed

Congratulations! You have finished the lesson "Strings".

Keep learning

Next lesson
Code
Solution Help Reset Submit Answer Submit Run Code Run
Output