Codecademy

Sign In Create Account
01/04
Step One: Strings

(This course assumes familiarity with the material presented in Lesson 1: Python Syntax.)

Another useful data type in Python is the string. Strings are, well, strings of characters, which is a more formal way of saying they're really just regular English phrases. They can include numbers, letters, and various symbols, like so: "We're #1!"

A string literal is a string created by literally just writing it down between quotation marks (' ' or " "). You have to use the same type of quotation mark on each end of the string, though—no 'string"s or "string's!

Assign the string "Always look on the bright side of life!" to the variable brian.

Stuck? Get a hint!Hint

Do you remember how to declare and assign variables in Python? If not, refresh your memory here!

Save & Submit Code Reset Code
Back to editor

Start Here

Each lesson starts here. Read the explanation, then follow the instructions underneath. If you get stuck, you can click on the "Hint" for help.

Enter your Code

Type your response to the instructions here, in your code editor.

Submit!

Ready to see if your code does what it should? Click "Save + Submit" to run and check your code!

Click "Save + Submit" to run your code! Your code’s output will pop up on the screen.

See What it Does

This is the terminal. When you submit your code, it will run your code and display the result here.

Sign in to Codecademy