Skip to content

Python

Python values

A number such as 3 and a string such as "Maya" show how Python represents different kinds of information.

Iris peeks at the sample data behind an event app. Her ticket count is written as 3, but her name is written as "Iris". Why does her name get quotation marks when the count doesn't?

Start the lesson

3 minutes. No sign-up needed.

What you'll learn4 ideas
  • A value is one piece of information Python works with, like Iris's ticket count 3.
  • Number values like 3 or 4.5 are written with no quotation marks, and they can have a decimal point.
  • Quotation marks make a value text, called a string, even when it holds digits like "3".
  • A string can use matching single or double quotes, and the quotes only mark where the text starts and ends.
Chapter 2: Values and variables7 lessons · 26 min

This lesson is part of the Python course.

Example plan3 lessons · 11 min

Python valuesValues and variables3 min
Numeric expressionsValues and variables5 min
String concatenationValues and variables3 min

An example. Your plan follows your answers, so it can start later and end sooner.

Build my plan

Start free, no account needed.